You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INAV includes an advanced power and current limiting system to protect your battery and ESCs from excessive discharge rates. This feature automatically reduces throttle output when current or power draw exceeds configured limits.
175
+
176
+
### Why Use Power Limiting?
177
+
178
+
Power and current limiting helps:
179
+
-**Protect batteries** from exceeding their C-rating and getting damaged
180
+
-**Prevent voltage sag** and brown-outs during high-throttle maneuvers
181
+
-**Extend battery lifespan** by avoiding excessive discharge rates
182
+
-**Improve safety** by preventing ESC or battery overheating
183
+
-**Comply with regulations** that may limit power output
184
+
185
+
### How It Works
186
+
187
+
The power limiter uses a PI (Proportional-Integral) controller to smoothly reduce throttle when current or power exceeds limits. It supports two operating modes:
188
+
189
+
1.**Continuous Limit**: The sustained current/power that can be drawn indefinitely
190
+
2.**Burst Limit**: A higher current/power allowed for a short duration before falling back to the continuous limit
191
+
192
+
This burst mode allows brief high-power maneuvers (like punch-outs or quick climbs) while protecting the battery during sustained high-throttle flight.
193
+
194
+
### Configuration
195
+
196
+
Power limiting requires a current sensor (`CURRENT_METER` feature). Power-based limiting additionally requires voltage measurement (`VBAT` feature).
197
+
198
+
#### Basic Settings (per battery profile)
199
+
200
+
| Setting | Description | Unit | Range |
201
+
|---------|-------------|------|-------|
202
+
|`limit_cont_current`| Continuous current limit | dA (deci-amps) | 0-2000 (0-200A) |
203
+
|`limit_burst_current`| Burst current limit | dA | 0-2000 (0-200A) |
2.**Test incrementally**: Start with conservative limits and increase gradually
303
+
304
+
3.**Monitor in flight**: Use OSD elements to see when limiting activates
305
+
306
+
4.**Calibrate current sensor**: Accurate current readings are critical - see "Current Monitoring" section above
307
+
308
+
5.**Tune PI controller**: If limiting feels abrupt or causes oscillation, adjust `limit_pi_p` and `limit_pi_i`:
309
+
- Increase P for faster response (may cause oscillation)
310
+
- Increase I for better steady-state accuracy
311
+
- Decrease if throttle oscillates during limiting
312
+
313
+
### Notes
314
+
315
+
- Power limiting is part of the battery profile system - each profile can have different limits
316
+
- Both current and power limiting can be active simultaneously - the most restrictive applies
317
+
- Limiting is applied smoothly via PI controller to avoid abrupt throttle cuts
318
+
- The system uses instantaneous current/power readings for responsive limiting
319
+
- Set limits to `0` to disable a specific limiter while keeping others active
320
+
172
321
## Battery capacity monitoring
173
322
174
323
For the capacity monitoring to work you need a current sensor (`CURRENT_METER` feature). For monitoring energy in milliWatt hour you also need voltage measurement (`VBAT` feature). For best results the current and voltage readings have to be calibrated.
Copy file name to clipboardExpand all lines: docs/development/Development.md
+103-6Lines changed: 103 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,11 +107,13 @@ The main flow for a contributing is as follows:
107
107
7.`git add <files that have changed>`
108
108
8.`git commit`
109
109
9.`git push origin my-new-code`
110
-
10. Create pull request using github UI to merge your changes from your new branch into `inav/master`
110
+
10. Create pull request using github UI to merge your changes from your new branch into the appropriate target branch (see "Branching and release workflow" below)
111
111
11. Repeat from step 4 for new other changes.
112
112
113
113
The primary thing to remember is that separate pull requests should be created for separate branches. Never create a pull request from your `master` branch.
114
114
115
+
**Important:** Most contributions should target a maintenance branch, not `master`. See the branching section below for guidance on choosing the correct target branch.
116
+
115
117
Later, you can get the changes from the INAV repo into your `master` branch by adding INAV as a git remote and merging from it as follows:
@@ -125,10 +127,105 @@ You can also perform the git commands using the git client inside Eclipse. Refe
125
127
126
128
## Branching and release workflow
127
129
128
-
Normally, all development occurs on the `master` branch. Every release will have it's own branch named `release_x.y.z`.
130
+
INAV uses maintenance branches for active development and releases. The `master` branch receives merges from maintenance branches.
131
+
132
+
### Branch Types
133
+
134
+
#### Maintenance Branches (Current and Next Major Version)
135
+
136
+
**Current version branch** (e.g., `maintenance-9.x`):
137
+
- Used for backward-compatible changes
138
+
- Bug fixes, new features, and improvements that don't break compatibility
139
+
- Changes here will be included in the next release of the current major version (e.g., 9.1, 9.2)
140
+
- Does not create compatibility issues between firmware and configurator within the same major version
141
+
142
+
**Next major version branch** (e.g., `maintenance-10.x`):
143
+
- Used for changes that introduce compatibility requirements
144
+
- Breaking changes that would cause issues between different major versions
145
+
- New features that require coordinated firmware and configurator updates
146
+
- Changes here will be included in the next major version release (e.g., 10.0)
147
+
148
+
#### Master Branch
149
+
150
+
The `master` branch receives periodic merges from maintenance branches.
151
+
152
+
### Choosing the Right Target Branch
153
+
154
+
When creating a pull request, target the appropriate branch:
155
+
156
+
**Target the current version branch** (e.g., `maintenance-9.x`) if your change:
157
+
- Fixes a bug
158
+
- Adds a new feature that is backward-compatible
159
+
- Updates documentation
160
+
- Adds or updates hardware targets
161
+
- Makes improvements that work with existing releases
162
+
163
+
**Target the next major version branch** (e.g., `maintenance-10.x`) if your change:
164
+
- Breaks compatibility with the current major version
165
+
- Requires coordinated firmware and configurator updates
166
+
- Changes MSP protocol in an incompatible way
167
+
- Modifies data structures in a breaking way
168
+
169
+
### Release Workflow
170
+
171
+
1. Development occurs on the current version maintenance branch (e.g., `maintenance-9.x`)
172
+
2. When ready for release, a release candidate is tagged from the maintenance branch
173
+
3. Bug fixes during the RC period continue on the maintenance branch
174
+
4. After final release, the maintenance branch is periodically merged into `master`
175
+
5. The cycle continues with the maintenance branch receiving new changes for the next release
176
+
177
+
### Propagating Changes Between Maintenance Branches
178
+
179
+
Changes committed to the current version branch should be merged forward to the next major version branch to prevent regressions.
129
180
130
-
During release candidate cycle we will follow the process outlined below:
181
+
**Maintainer workflow:**
182
+
- Changes merged to `maintenance-9.x` should be regularly merged into `maintenance-10.x`
183
+
- This ensures fixes and features aren't lost when the next major version is released
184
+
- Prevents users from experiencing bugs in v10.0 that were already fixed in v9.x
131
185
132
-
1. Create a release branch `release_x.y.z`
133
-
2. All bug fixes found in the release candidates will be merged into `release_x.y.z` branch and not into the `master`.
134
-
3. After final release is made, the branch `release_x.y.z` is locked, and merged into `master` bringing all of the bug fixes into the development branch. Merge conflicts that may arise at this stage are resolved manually.
186
+
**Example:**
187
+
```bash
188
+
# Merge changes from current to next major version
189
+
git checkout maintenance-10.x
190
+
git merge maintenance-9.x
191
+
git push upstream maintenance-10.x
192
+
```
193
+
194
+
### Example Timeline
195
+
196
+
Current state (example):
197
+
-`maintenance-9.x` - Active development for INAV 9.1, 9.2, etc.
198
+
-`maintenance-10.x` - Breaking changes for future INAV 10.0
199
+
-`master` - Receives periodic merges from maintenance branches
200
+
201
+
After INAV 10.0 is released:
202
+
-`maintenance-10.x` - Active development for INAV 10.1, 10.2, etc.
203
+
-`maintenance-11.x` - Breaking changes for future INAV 11.0
204
+
-`master` - Continues receiving merges
205
+
206
+
### Working with Maintenance Branches
207
+
208
+
To branch from the current maintenance branch instead of master:
209
+
210
+
```bash
211
+
# Fetch latest changes
212
+
git fetch upstream
213
+
214
+
# Create your feature branch from the maintenance branch
0 commit comments