Skip to content

Maintenance 9.x to Maintenance-10.x#11457

Merged
sensei-hacker merged 44 commits intomaintenance-10.xfrom
maintenance-9.x
Mar 25, 2026
Merged

Maintenance 9.x to Maintenance-10.x#11457
sensei-hacker merged 44 commits intomaintenance-10.xfrom
maintenance-9.x

Conversation

@sensei-hacker
Copy link
Copy Markdown
Member

No description provided.

functionpointer and others added 30 commits November 22, 2025 20:25
Prevent continuous servo autotrim from applying trim adjustments during
maneuver transitions when I-term is changing rapidly due to transient error.

Root Cause:
The autotrim code verified all flight conditions (level attitude, centered
sticks, low rotation rate) but failed to check that the I-term was in a
steady state before transferring it to servo trim. During maneuver transitions
(e.g., exiting a turn), I-term accumulates transient error. When the plane
momentarily satisfies all level-flight conditions, this transient I-term is
incorrectly transferred to servo midpoints, causing the aircraft to fly
out-of-trim.

Changes:
- Added I-term rate-of-change tracking in processContinuousServoAutotrim()
- Added stability threshold check before applying autotrim
- Added configurable parameter: servo_autotrim_iterm_rate_limit (default: 2)
- Only transfers I-term to trim when rate of change is below threshold

The fix ensures trim updates only occur during true steady-level flight,
not during transient conditions following maneuvers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Move I-term tracking outside stable flight check for accurate rate calculation
- Move servo_autotrim_iterm_rate_limit to end of struct for EEPROM compatibility
Add hwVersion field to MSP_GPSSTATISTICS (166) for GPS module detection:
- Field added at end of message (backward compatible)
- Exposes gpsState.hwVersion (800=M8, 900=M9, 1000=M10, 0=Unknown)
- Enables configurator auto-detection of GPS module type

Changes:
- src/main/fc/fc_msp.c: Add sbufWriteU32(dst, gpsState.hwVersion)
- docs/development/msp/msp_messages.json: Document hwVersion field

Used by configurator GPS preset UI to automatically configure optimal
constellation/rate settings based on hardware capability (M8/M9/M10).

Backward compatible: Old configurators ignore extra bytes, new configurators
check byteLength before reading hwVersion field.

Related configurator PR: feature-gps-preset-ui branch
Research: claude/developer/docs/gps/m9-16-satellite-limitation-official.md
Changed defaults to provide better out-of-box accuracy:
- gps_ublox_use_galileo: OFF → ON
- gps_ublox_use_beidou: OFF → ON
- gps_ublox_use_glonass: OFF (unchanged)
- gps_ublox_nav_hz: 10 → 8

Rationale:
- 3 constellations (GPS+Galileo+Beidou) provide excellent coverage
- 8Hz allows M9 modules to use 32 satellites (vs 16 at ≥10Hz)
- Safe for M8 (handles 8Hz easily)
- Optimal for M10 with 3 constellations at default clock
- Glonass remains OFF to avoid M10 processing overhead

Updated nav_hz description to document M9's 16-satellite
limitation at ≥10Hz, discovered through u-blox forum research
and Clive Turvey's code analysis.

Regenerated Settings.md from settings.yaml.

Related: GPS preset UI feature
Addresses Qodo code review suggestion to prevent sending uninitialized
memory over MSP_GPSSTATISTICS.

While global variables are zero-initialized in C, explicit initialization
is better practice:
- Makes intent clear in code
- Works for all GPS providers (UBLOX, MSP, FAKE)
- Future-proof if gpsState becomes non-global
- Documents that 0 means UNKNOWN

u-blox driver also initializes to UBX_HW_VERSION_UNKNOWN (0) during
configuration, but this ensures all code paths are safe.
Signed-off-by: ncerzzk <huangcmzzk@gmail.com>
Position estimator GPS origin altitude improvement for poor initial GPS epv
sensei-hacker and others added 14 commits March 18, 2026 19:49
Add GPS hardware version to MSP and optimize defaults for M8/M9/M10
…iterm

Fix #9912: Add I-term stability check to servo autotrim
When a pull request only modifies files within one directory under
src/main/target/, there is no need to rebuild all ~150 targets.

A new `detect` job inspects the changed files. If every changed file
is inside exactly one src/main/target/<DIR>/ sub-directory, the target
names are read from that directory's CMakeLists.txt and passed to a
new `build-single-target` job which runs `ninja <targets>` on a single
runner instead of the usual 15-job matrix.

Any PR that touches files outside a single target directory falls
through to the existing full matrix build unchanged.

The `upload-artifacts` job is updated to accept output from either
build path.
CI: build only affected target for single-target PRs
fix lsm6dxx driver lack gyroAlign setting issue.
Blackbox acceleration/vibration fixes
@sensei-hacker sensei-hacker merged commit c36b5d7 into maintenance-10.x Mar 25, 2026
32 checks passed
@github-actions
Copy link
Copy Markdown

Test firmware build ready — commit 56fb9e4

Download firmware for PR #11457

228 targets built. Find your board's .hex file by name on that page (e.g. MATEKF405SE.hex). Files are individually downloadable — no GitHub login required.

Development build for testing only. Use Full Chip Erase when flashing.

xznhj8129 pushed a commit to xznhj8129/inav that referenced this pull request Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants