Skip to content

Commit 4387dd7

Browse files
author
艾多多
committed
Merge maintenance-9.x into feature/dterm-prediff-lpf
2 parents dc896d6 + 0b92214 commit 4387dd7

113 files changed

Lines changed: 4732 additions & 948 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cmake/main.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ function(setup_firmware_target exe name)
108108
endfunction()
109109

110110
function(exclude_from_all target)
111-
set_property(TARGET ${target} PROPERTY
111+
set_target_properties(${target} PROPERTIES
112112
TARGET_MESSAGES OFF
113-
EXCLUDE_FROM_ALL 1
114-
EXCLUDE_FROM_DEFAULT_BUILD 1)
113+
EXCLUDE_FROM_ALL ON
114+
EXCLUDE_FROM_DEFAULT_BUILD ON)
115115
endfunction()
116116

117117
function(collect_targets)

cmake/sitl.cmake

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ main_sources(SITL_SRC
1919
target/SITL/sim/realFlight.h
2020
target/SITL/sim/simHelper.c
2121
target/SITL/sim/simHelper.h
22-
target/SITL/sim/simple_soap_client.c
23-
target/SITL/sim/simple_soap_client.h
22+
target/SITL/sim/soap_client.c
23+
target/SITL/sim/soap_client.h
2424
target/SITL/sim/xplane.c
2525
target/SITL/sim/xplane.h
2626
)
@@ -163,8 +163,8 @@ function (target_sitl name)
163163
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
164164
COMMAND ${generator_cmd} clean
165165
COMMENT "Removing intermediate files for ${name}")
166-
set_property(TARGET ${clean_target} PROPERTY
167-
EXCLUDE_FROM_ALL 1
168-
EXCLUDE_FROM_DEFAULT_BUILD 1)
166+
set_target_properties(${clean_target} PROPERTIES
167+
EXCLUDE_FROM_ALL ON
168+
EXCLUDE_FROM_DEFAULT_BUILD ON)
169169
endif()
170170
endfunction()

docs/Backup and Restore.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# Backup and Restore
2+
3+
INAV Configurator can automatically back up your configuration before flashing firmware and offer to restore it afterwards. When upgrading across major versions (e.g. 7.x → 8.x → 9.x), settings are automatically migrated to the new firmware format.
4+
5+
For manual CLI-based backup and restore, see the [CLI documentation](Cli.md#backup-via-cli).
6+
7+
## Automatic Backup & Restore During Firmware Flash
8+
9+
### What happens automatically
10+
11+
1. **Before flashing** (with or without Full Chip Erase enabled): Your current CLI configuration (`diff all`) is automatically captured and saved to the backup directory.
12+
2. **After flashing**: Depending on the situation, the Configurator offers to restore your settings if Full Chip Erase was enabled:
13+
14+
| Scenario | Behavior |
15+
|----------|----------|
16+
| **Patch update** (e.g. 8.0.0 → 8.0.1) | Auto-restore offered immediately |
17+
| **Minor update** (e.g. 8.0.0 → 8.1.0) | Auto-restore offered immediately |
18+
| **Major upgrade** (e.g. 7.x → 8.x) with migration profile available | Migration preview shown — confirm to restore with converted settings |
19+
| **Major upgrade** without migration profile | Warning shown — restore still possible but some settings may fail |
20+
| **Major downgrade** (e.g. 9.x → 7.x) | Auto-restore blocked — manual restore only (settings may be incompatible) |
21+
| **Local firmware file** (loaded from disk) | No auto-restore offered — backup is still saved |
22+
| **Flash without Full Chip Erase** | Backup taken, no restore offered |
23+
24+
### Migration Preview
25+
26+
When updating across major versions (e.g. 7.x → 9.x), the Configurator shows a **migration preview overlay** before restoring. This lists:
27+
28+
- **Removed settings** — settings that no longer exist in the new firmware (will be skipped)
29+
- **Renamed settings** — settings whose name changed (automatically converted)
30+
- **Renamed commands** — CLI commands that were renamed (automatically converted)
31+
- **Value replacements** — setting values that changed meaning (automatically converted)
32+
- **Setting remappings** — numeric IDs that were renumbered (automatically converted)
33+
- **Warnings** — settings whose semantics changed and require manual review
34+
35+
You can review all changes before confirming or cancelling the restore.
36+
37+
Multi-step migrations are handled automatically. For example, a 7.x → 9.x upgrade applies migration profiles in sequence (7→8, then 8→9).
38+
39+
## Manual Backup & Restore
40+
41+
The Firmware Flasher tab provides three buttons:
42+
43+
- **Backup Config** — saves your current CLI configuration to a file (opens save dialog)
44+
- **Restore Config** — loads a backup file and restores it to your flight controller
45+
- If the backup is from a different major version, the migration preview is shown first
46+
- If no migration profile exists for the version gap, a warning is shown but you can still proceed
47+
- **Open Backups Folder** — opens the backup directory in your file manager
48+
49+
For CLI-based backup and restore procedures, see [Backup via CLI](Cli.md#backup-via-cli) and [Restore via CLI](Cli.md#restore-via-cli).
50+
51+
## Backup File Location
52+
53+
Backups are stored in your OS-specific application data directory:
54+
55+
| OS | Path |
56+
|----|------|
57+
| **Windows** | `%APPDATA%/inav-configurator/backups/` |
58+
| **macOS** | `~/Library/Application Support/inav-configurator/backups/` |
59+
| **Linux** | `~/.config/inav-configurator/backups/` |
60+
61+
Use the **Open Backups Folder** button in the Firmware Flasher tab to open this directory.
62+
63+
## Backup File Naming
64+
65+
| Type | Format |
66+
|------|--------|
67+
| Auto-backups | `UPDATE_inav_backup_{version}_{board}_{YYYY-MM-DD_HHMMSS}.txt` |
68+
| Manual backups | `inav_backup_{version}_{board}_{YYYY-MM-DD_HHMMSS}.txt` |
69+
70+
Auto-backups are pruned automatically — only the 10 most recent are kept. Files you rename are never pruned.
71+
72+
## Backup File Format
73+
74+
Backup files are plain-text CLI dumps with a metadata header:
75+
76+
```
77+
# INAV Backup
78+
# Version: 8.0.0
79+
# Board: SPEEDYBEEF405V4
80+
# Date: 2026-04-11T10:30:00.000Z
81+
# Craft: MyQuad
82+
#
83+
# INAV/SPEEDYBEEF405V4 8.0.0 Apr 1 2026 / 12:00:00 (abc1234)
84+
# GCC-13.2.1
85+
# ...
86+
set gyro_main_lpf_hz = 110
87+
set acc_hardware = AUTO
88+
...
89+
```
90+
91+
You can open and edit these files with any text editor.
92+
93+
## Restore Error Handling
94+
95+
If errors occur during restore (e.g. unknown settings, invalid values):
96+
97+
- An error dialog shows the affected lines
98+
- You can choose:
99+
- **Save anyway** — saves the successfully applied settings and reboots
100+
- **Abort** — discards all changes and exits CLI mode
101+
102+
## Tips
103+
104+
- **Always flash with Full Chip Erase** when upgrading to a new version. This ensures clean defaults and triggers automatic backup and restore.
105+
- **Review migration previews carefully** — especially the warnings section, which highlights settings whose meaning may have changed.
106+
- **Keep manual backups** before major upgrades. While auto-backup handles this, having an extra copy in a known location gives peace of mind.
107+
- **Use `diff` over `dump`** for backups. The `diff` format only stores settings that differ from defaults, which makes restoring safer across versions. The auto-backup feature already uses `diff all`.

docs/Cli.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ See the other documentation sections for details of the cli commands and setting
2222

2323
## Backup via CLI
2424

25+
> **Note:** The INAV Configurator now performs automatic backups before flashing and can restore settings afterwards, including migration across major versions. See [Backup and Restore](Backup%20and%20Restore.md) for details. The CLI method below remains available for manual backup.
26+
2527
Disconnect main power, connect to cli via USB/FTDI.
2628

2729
dump using cli

docs/Configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ See the Serial section for more information and see the Board specific sections
1010
The GUI cannot currently configure all aspects of the system, the CLI must be used to enable or configure
1111
some features and settings.
1212

13-
__Due to ongoing development, the fact that the GUI cannot yet backup all your settings and automatic chrome updates of the GUI app it is highly advisable to backup your settings (using the CLI) so that when a new version of the configurator or firmware is released you can re-apply your settings.__
13+
__The INAV Configurator now (versions after 9.0.x) automatically backs up your settings before flashing firmware and can restore them afterwards (when Full Chip Erase is enabled), including automatic migration across major versions. For details, see [Backup and Restore](Backup%20and%20Restore.md). You can also manually backup and restore settings using the [CLI](Cli.md#backup-via-cli).__
1414

1515

1616
## GUI

docs/Controls.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The stick positions are combined to activate different functions:
3131
| Battery profile 3 | HIGH | LOW | CENTER | HIGH |
3232
| Calibrate Gyro | LOW | LOW | LOW | CENTER |
3333
| Calibrate Acc | HIGH | LOW | LOW | CENTER |
34-
| Calibrate Mag/Compass | HIGH | HIGH | LOW | CENTER |
34+
| Calibrate Compass/Zero Yaw | HIGH | HIGH | LOW | CENTER |
3535
| Trim Acc Left | HIGH | CENTER | CENTER | LOW |
3636
| Trim Acc Right | HIGH | CENTER | CENTER | HIGH |
3737
| Trim Acc Forwards | HIGH | CENTER | HIGH | CENTER |
@@ -52,6 +52,14 @@ The stick positions are combined to activate different functions:
5252
For graphical stick position in all transmitter modes, check out [this page](https://www.mrd-rc.com/tutorials-tools-and-testing/inav-flight/inav-stick-commands-for-all-transmitter-modes/).
5353
![Stick Positions](assets/images/StickPositions.png)
5454

55+
## Compass Calibration and Yaw Zero Reset
56+
57+
The stick function `Calibrate Compass/Zero Yaw` provides 2 functions depending on whether or not a compass is available.
58+
59+
If a compass is available the stick function initiates the compass calibration routine.
60+
61+
If no compass is available the stick function will reset the current yaw/heading estimate to zero (North) and also set the heading as trusted. This is useful on multirotors, allowing the craft yaw/heading to be correctly aligned to actual North simply by physically pointing the craft North then using the stick function to zero the yaw estimate. Since this also sets the heading as trusted Nav modes reliant on heading will be available immediately after arming without the need to fly fast enough to obtain a valid heading from GPS ground course.
62+
5563
## Yaw control
5664

5765
While arming/disarming with sticks, your yaw stick will be moving to extreme values. In order to prevent your craft from trying to yaw during arming/disarming while on the ground, your yaw input will not cause the craft to yaw when the throttle is LOW (i.e. below the `min_check` setting).

docs/Installation.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ When upgrading be sure to backup / dump your existing settings. Some firmware r
2727

2828
## Backup/Restore process
2929

30-
See the CLI section of the docs for details on how to backup and restore your configuration via the CLI.
30+
The INAV Configurator (after version 9.0.x) automatically backs up your configuration before flashing and offers to restore it afterwards (when Full Chip Erase is enabled) — including automatic settings migration when upgrading across major versions.
31+
32+
For details on automatic and manual backup/restore, see [Backup and Restore](Backup%20and%20Restore.md).
33+
34+
For CLI-based backup and restore, see the [CLI documentation](Cli.md#backup-via-cli).

docs/Rx.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ bind_msp_rx <port>
201201

202202
## MultiWii serial protocol (MSP RX)
203203

204-
Allows you to use MSP commands as the RC input. Up to 18 channels are supported.
204+
Allows you to use MSP commands as the RC input. Up to 34 channels are supported.
205205
Note:
206206
* It is necessary to update `MSP_SET_RAW_RC` at 5Hz or faster.
207207
* `MSP_SET_RAW_RC` uses the defined RC channel map
@@ -213,6 +213,31 @@ Note:
213213

214214
Enables the use of a joystick in the INAV SITL with a flight simulator. See the [SITL documentation](SITL/SITL.md).
215215

216+
## MSP Auxiliary RC Channel Overlay (MSP2_INAV_SET_AUX_RC)
217+
218+
Allows extending the available RC channel count beyond the native RC link capacity using `MSP2_INAV_SET_AUX_RC` (`0x2230`). This is a lightweight, bandwidth-efficient alternative to `MSP_SET_RAW_RC` for auxiliary channels only.
219+
220+
**Key properties:**
221+
- Controls **CH13–CH32** only (CH1–CH12 are protected and rejected)
222+
- Configurable resolution: 2-bit (3 positions), 4-bit (~71µs steps), 8-bit (~3.9µs steps), or 16-bit (raw PWM)
223+
- Value `0` = skip (no update) — previous value persists indefinitely
224+
- No flight mode or special configuration required — always active
225+
- Does **not** affect failsafe detection
226+
- Recommended to send with `MSP_FLAG_DONT_REPLY` (`flags=0x01`) on telemetry passthrough links
227+
228+
**Typical use case:** A Lua script on the radio sends `MSP2_INAV_SET_AUX_RC` via SmartPort/CRSF/ELRS telemetry passthrough to control auxiliary functions (lights, camera triggers, gimbal modes) on channels beyond the RC link's native capacity.
229+
230+
**Priority order** (last writer wins):
231+
1. Primary RX (SBUS, CRSF, FPort, etc.)
232+
2. MSP RC Override (if active)
233+
3. **MSP AUX Overlay** (CH13–CH32)
234+
235+
**Important:** For serial RX protocols, the firmware cannot detect which channels the sender actively uses. If AUX_RC targets a channel that the RX link also sends, AUX_RC will override it. Configure the start channel above your RC link's active channel range.
236+
237+
When MSP is the primary RX provider (`receiver_type = MSP`), channels covered by `MSP_SET_RAW_RC` are automatically protected. Channels in the `msp_override_channels` bitmask are also protected when MSP RC Override mode is active.
238+
239+
See the [MSP documentation](development/msp/README.md) for the full message format.
240+
216241
## Configuration
217242

218243
The receiver type can be set from the configurator or CLI.

docs/Settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5634,7 +5634,7 @@ Defines rotation rate on PITCH axis that UAV will try to archive on max. stick d
56345634

56355635
### pitot_hardware
56365636

5637-
Selection of pitot hardware.
5637+
Selection of pitot hardware. VIRTUAL only works if a GPS is enabled.
56385638

56395639
| Default | Min | Max |
56405640
| --- | --- | --- |

0 commit comments

Comments
 (0)