Skip to content

Release/9.1 to master#11622

Merged
sensei-hacker merged 84 commits into
masterfrom
release/9.1
Jun 6, 2026
Merged

Release/9.1 to master#11622
sensei-hacker merged 84 commits into
masterfrom
release/9.1

Conversation

@sensei-hacker
Copy link
Copy Markdown
Member

No description provided.

sensei-hacker and others added 30 commits January 14, 2026 16:22
Add documentation about using CMAKE_BUILD_TYPE=Release to save disk space
when building firmware for production/CI/releases.

Key points:
- Default RelWithDebInfo mode uses ~109 GB for all targets
- Release mode uses ~4-6 GB (96% reduction)
- Debug symbols are stripped from final .hex files anyway
- Final binaries are identical in both modes

Updated files:
- docs/development/Building in Linux.md
  - Add brief note about debug symbols in single target section
  - Add new "Building All Targets or Release Builds" section with
    disk usage comparison and Release mode instructions

- docs/development/release-create.md
  - Add "Building Firmware Locally" section with Release mode
    instructions and disk usage information

Also fixes typo: "Bulding" -> "Building"
Both osdGetSystemMessage() and osdGetMultiFunctionMessage() accumulate
message pointers into a fixed-size array with no bounds checking. With
recent additions (geozone avoidance, pitot validation, etc.) the number
of potential writes exceeds the array size, causing stack corruption.

Introduce a scoped ADD_MSG() macro that guards each write:

    #define ADD_MSG(msg) if (messageCount < ARRAYLEN(messages)) \
        messages[messageCount++] = (msg)

Excess messages are silently dropped rather than written past the end
of the array. The macro is #undef'd at the end of each function.

Fixes: #10048 (Yury-MonZon)
ANYFC, CLRACINGF4AIR (V1/V2/V3), FF_F35_LIGHTNING, WINGFC,
FLYINGRCF4WINGMINI_NOT_RECOMMENDED, AIRBOTF7, and OMNIBUSF7NANOV7
all lack USE_FLASHFS/USE_SDCARD in their target config. Building
_bl/_for_bl/_with_bl variants for these targets produces binaries
that define MSP_FIRMWARE_UPDATE but have no storage backend, making
OTA firmware update silently non-functional.

Add NO_BOOTLOADER to cmake/stm32.cmake (following the DISABLE_MSC
pattern) and set it on each affected target. This suppresses the
broken bootloader build variants while leaving open the possibility
of adding proper storage support to these targets in the future.

Note: bootloader variants are not built by CI (they are not added to
VALID_TARGETS), so this bug was never caught by automated builds.

Fixes: #11521
- MSP_SIMULATOR v2/v3 protocol: refactor into readMspSimulatorValues()
  and mspProcessSimulatorCommand(); v3 uses 2-byte flags field
- New HITL flags: HITL_RANGEFINDER, HITL_CURRENT_SENSOR, HITL_SIM_RC_INPUT,
  HITL_FAILSAFE_TRIGGERED, HITL_SITL_MODE
- Fix GPS velocity: exclude HITL mode from validVelNE path (same as SITL)
- battery.c: inject simulated current when HITL_CURRENT_SENSOR active
- displayport_msp_osd.c: enable OSD vtxActive in SITL mode
- runtime_config: add SIMULATOR_MSP_VERSION_3 and new HITL flag bits
- common.h: promote RX_SIM and RANGEFINDER_FAKE out of SITL-only target.h
- xplane.h: add stdbool.h include and simXPlaneClose() declaration
- xplane.c: INAV-XITL plugin with DataRef state machine; add atomic
  thread safety and simXPlaneClose() from maintenance-9.x
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
STM32H743 based FC with dual ICM42688P gyros on SPI1/SPI4,
MAX7456 OSD on SPI2, M25P16 flash on SPI3, BMP280/DPS310 baro
on I2C1, 8 motors (TIM1x4, TIM8x2, TIM3x2), 8 UARTs, and
PINIO for VTX and camera switching.
Corrected the spelling of 'Bulding' to 'Building' in the documentation.
Under INTERPROCEDURAL_OPTIMIZATION, the compiler inlines settingGet and
settingGetIndex with divergent static settingsTable base addresses,
causing MSPV2_SETTING to return wrong data for some settings while
MSP2_COMMON_SETTING_INFO (name lookup) is correct.
- Improve comment accuracy: describe observed behavior rather than the
  inferred mechanism; note why raw attribute is used instead of NOINLINE
  macro (NOINLINE is empty on non-F7/H7 targets but bug affects all LTO
  release builds)
- Add noinline to settingGetPgn which has identical pointer arithmetic
  against settingsTable and is called from settingGetValuePointer
- Add brief comments above settingGetIndex and settingGetPgn pointing
  back to the main explanation on settingGet
…tting-index

fix: prevent LTO from breaking settingGet/settingGetIndex round-trip
PC-port pins on STM32H743 require ADC3. PC1 (VBat, ADC123_INP11)
and PC2 (Current, ADC3_INP0) both work on ADC3; ADC1 init silently
fails for these pins. Same fix applied to MAMBAH743, FOXEERH743.
…rage

fix: disable bootloader variants for targets without storage backend
- Add USE_I2C_DEVICE_2 (PB10/PB11) for external magnetometer
- Route MAG_I2C_BUS to BUS_I2C2 to match board layout
- Fix VBAT_SCALE_DEFAULT (was Betaflight value, not INAV scale)

Both ADC and magnetometer verified working on hardware.
HITL/SITL X-Plane improvements (merge of #11253)
dtrbinh and others added 18 commits May 31, 2026 11:58
Removed redundant phrases and clarified manufacturer information.
[FIX] Prevent stack smashing via unbounded OSD message array writes
…dcoded constant

The configurable CLI setting added in #11215 was based on a default of 2
with no empirical basis. Blackbox analysis of real flight data shows i-term
rates of 4–9 units/s (median) and up to 30 units/s (90th percentile) during
settled cruise flight. A hardcoded constant of 30 gives reasonable protection
against turbulence-driven i-term spikes without exposing a tuning knob that
pilots cannot meaningfully calibrate.
…m-rate-limit-setting

FW autotrim: replace servo_autotrim_iterm_rate_limit setting with hardcoded constant
pinioBoxConfig_t was missing from the reference database despite
SPEEDYBEEF745AIO having USE_PINIOBOX defined. The struct is
uint8_t permanentId[PINIO_COUNT] (4 bytes), PG version 1.
…nioBoxConfig_t

Add pinioBoxConfig_t to PG struct sizes reference database
@qodo-code-review
Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Branch Targeting Suggestion

You've targeted the master branch with this PR. Please consider if a version branch might be more appropriate:

  • maintenance-9.x - If your change is backward-compatible and won't create compatibility issues between INAV firmware and Configurator 9.x versions. This will allow your PR to be included in the next 9.x release.

  • maintenance-10.x - If your change introduces compatibility requirements between firmware and configurator that would break 9.x compatibility. This is for PRs which will be included in INAV 10.x

If master is the correct target for this change, no action is needed.


This is an automated suggestion to help route contributions to the appropriate branch.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Test firmware build ready — commit 48829a5

Download firmware for PR #11622

238 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.

@sensei-hacker sensei-hacker changed the base branch from master to copilot/revert-pr-11025 June 6, 2026 05:23
@sensei-hacker sensei-hacker changed the base branch from copilot/revert-pr-11025 to master June 6, 2026 05:23
- Add version string format section: lowercase rc + hyphen required by
  Configurator firmware flasher regex (uppercase RC causes firmware to
  be invisible in flasher after upload)
- Fix rename script: use hyphen separator in output filename to match
  the required inav_<version>-rc<n>_<TARGET>.hex pattern
- Replace directory-flattening find command with platform-organized
  mkdir/mv; flattening caused a Windows .exe inside macOS DMG in 9.0.0
- Add PR branch verification step in changelog section: gh pr list
  shows PRs by date regardless of target branch, so PRs on
  maintenance-10.x can appear falsely
- Update gh release create examples: add --prerelease for RC releases,
  use --target <sha> for atomic tagging at a specific commit
- Add post-publish verification: confirm firmware appears in Configurator
  Firmware Flasher before publishing the Configurator release
Commit 58dc107 re-added SERVO_AUTOTRIM_FILTER_CUTOFF and related
constants to servos.c as local #defines, but they were already moved
to servos.h by a prior refactor (dcc404e). The duplicate caused a
build error: the .c definition used integer 1 while the header has
1.0f, triggering -Werror,-Wmacro-redefined on all targets.

Remove the redundant block from servos.c and add the one genuinely
new constant (SERVO_AUTOTRIM_ITERM_RATE_LIMIT) to servos.h alongside
the existing autotrim constants.
…dcoded constant

The configurable CLI setting added in #11215 was based on a default of 2
with no empirical basis. Blackbox analysis of real flight data shows i-term
rates of 4–9 units/s (median) and up to 30 units/s (90th percentile) during
settled cruise flight. A hardcoded constant of 30 gives reasonable protection
against turbulence-driven i-term spikes without exposing a tuning knob that
pilots cannot meaningfully calibrate.
@sensei-hacker sensei-hacker merged commit e7d5cce into master Jun 6, 2026
50 checks passed
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.