Skip to content

Commit dbe338a

Browse files
Merge pull request iNavFlight#11257 from iNavFlight/maintenance-9.x
Merge 9.x to master
2 parents 4001681 + a7932b9 commit dbe338a

20 files changed

Lines changed: 4792 additions & 3553 deletions

docs/Blackbox.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,36 @@ The CLI command `blackbox` allows setting which Blackbox fields are recorded to
166166
* `PEAKS_R` - Roll axis noise peak
167167
* `PEAKS_P` - Pitch axis noise peak
168168
* `PEAKS_Y` - Yaw axis noise peak
169+
* `SERVOS` - Servo outputs (for planes, tris, etc.)
169170

170171
Usage:
171172

172173
* `blackbox` currently enabled Blackbox fields
173174
* `blackbox list` all available fields
174175
* `blackbox -MOTORS` disable MOTORS logging
175-
* `blackbox MOTOR` enable MOTORS logging
176+
* `blackbox MOTORS` enable MOTORS logging
177+
178+
### Debug Mode Logging
179+
180+
In addition to the standard blackbox fields above, INAV supports logging debug values for troubleshooting and analysis via the `debug_mode` setting. When a debug mode is active, it populates 8 debug values (`debug[0]` through `debug[7]`) with mode-specific data that gets logged to the blackbox.
181+
182+
Available debug modes include:
183+
- `FLOW_RAW` - Optical flow sensor raw data (useful for sensor alignment)
184+
- `LANDING` - Landing mode debugging
185+
- `POS_EST` - Position estimation debugging
186+
- `GPS` - GPS debugging
187+
- `ALTITUDE` - Altitude estimation debugging
188+
- And 20+ other modes for specific subsystems
189+
190+
To use debug mode logging:
191+
```
192+
set debug_mode = FLOW_RAW # Enable a specific debug mode
193+
set debug_mode = NONE # Disable debug mode (default)
194+
```
195+
196+
You can view current debug values in the CLI with the `debug` command, or display them in real-time on your OSD using the `OSD_DEBUG` element.
197+
198+
For technical details on debug logging and blackbox internals, see the [Blackbox Internals](development/Blackbox%20Internals.md) documentation.
176199

177200
## Usage
178201

docs/Settings.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,11 @@ Max Antigravity gain. `1` means Antigravity is disabled, `2` means Iterm is allo
434434

435435
### apa_pow
436436

437-
Use airspeed instead of throttle position for PID attenuation if airspeed is available on fixedwing. pid_multiplier = (referenceAirspeed/airspeed)**(apa_pow/100). Set to 0 will disable this feature and use throttle based PID attenuation;
437+
Use airspeed instead of throttle position for PID attenuation if airspeed is available on fixedwing. Scales P/D/FF with airspeed (I-term scaled less aggressively). Gains range from 30% (high speed) to 150% (low speed). Set to 0 to disable and use throttle-based attenuation. Recommended: 120 for aircraft with validated pitot sensor.
438438

439439
| Default | Min | Max |
440440
| --- | --- | --- |
441-
| 120 | 0 | 200 |
441+
| 0 | 0 | 200 |
442442

443443
---
444444

@@ -1478,7 +1478,7 @@ TPA smoothing and delay time constant to reflect non-instant speed/throttle resp
14781478

14791479
| Default | Min | Max |
14801480
| --- | --- | --- |
1481-
| 1500 | 0 | 5000 |
1481+
| 2000 | 0 | 5000 |
14821482

14831483
---
14841484

docs/USB Flashing.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,26 @@ With the board connected and in bootloader mode (reset it by sending the charact
6868

6969
Put the device into DFU mode by **one** of the following:
7070

71-
* Use the hardware button on the board
72-
* Send a single 'R' character to the serial device, e.g. on POSIX OS using `/dev/ttyACM0` at 115200 baudrate.
71+
* **Hardware button:** Press and hold the DFU/BOOT button while plugging in USB
7372

73+
* **Serial CLI sequence:** Send `####\r\n`, wait for CLI prompt, then send `dfu\r\n`
74+
75+
```bash
76+
# Enter CLI mode
77+
echo -ne '####\r\n' > /dev/ttyACM0
78+
79+
# Wait for "CLI" prompt (important - don't skip!)
80+
# Recommended: use a proper script that reads serial response
81+
82+
# Send DFU command
83+
echo -ne 'dfu\r\n' > /dev/ttyACM0
7484
```
75-
stty 115200 < /dev/ttyACM0
76-
echo -ne 'R' > /dev/ttyACM0
77-
```
78-
* Use the CLI command `dfu`
85+
86+
**Note:** The simple single 'R' character method shown in older documentation is unreliable. The above sequence is required for proper CLI entry.
87+
88+
* **CLI command:** If already connected to CLI via configurator or terminal: type `dfu`
89+
90+
* **MSP command:** Use MSP_REBOOT with DFU parameter (INAV 9.x+) - most reliable programmatic method
7991

8092
It is necessary to convert the `.hex` file into `Intel binary`. This can be done using the GCC `objcopy` command; e.g. for the notional `inav_x.y.z_NNNNNN.hex`.
8193

docs/development/msp/format.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
**reply**: null or dict of data received\
4040
**variable_len**: Optional boolean, if true, message does not have a predefined fixed length and needs appropriate handling\
4141
**variants**: Optional special case, message has different cases of reply/request. Key/description is not a strict expression or code; just a readable condition\
42-
**not_implemented**: Optional special case, message is not implemented\
42+
**not_implemented**: Optional special case, message is not implemented (never or deprecated)\
4343
**notes**: String with details of message
4444

4545
## Data dict fields:

docs/development/msp/gen_enum_md.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def is_plain_int_literal(expr: str) -> Optional[int]:
6262

6363
# ---------- Parsing regexes ----------
6464

65-
RE_ENUM_START = re.compile(r'^\s*typedef\s+enum\s*\{')
65+
RE_ENUM_START = re.compile(r'^\s*typedef\s+enum(?:\s+[A-Za-z_]\w*)?\s*\{')
6666
RE_ENUM_END = re.compile(r'^\s*\}\s*([A-Za-z_]\w*)\s*;')
6767
RE_LINE_COMMENT = re.compile(r'^\s*//\s*(.+?)\s*$')
6868

@@ -273,6 +273,9 @@ def render_markdown(enums: List[EnumDef]) -> str:
273273
cond = it.cond
274274
out.append(f"| {name_md} | {val} | {cond} |")
275275
jsonfile[e.name][name_md.strip('`')] = [val, cond] if len(cond)>0 else val
276+
# normalize source to a stable inav/src/... path
277+
if '_source' in jsonfile[e.name]:
278+
jsonfile[e.name]['_source'] = jsonfile[e.name]['_source'].replace('../../../src', 'inav/src')
276279
out.append("")
277280
# While we're at it, chuck this all into a JSON file
278281
Path("inav_enums.json").write_text(json.dumps(jsonfile,indent=4), encoding="utf-8")

0 commit comments

Comments
 (0)