Skip to content

[pull] master from iNavFlight:master#22

Open
pull[bot] wants to merge 6592 commits intoemtrax-ltd:masterfrom
iNavFlight:master
Open

[pull] master from iNavFlight:master#22
pull[bot] wants to merge 6592 commits intoemtrax-ltd:masterfrom
iNavFlight:master

Conversation

@pull
Copy link

@pull pull bot commented Apr 24, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

sensei-hacker and others added 28 commits November 30, 2025 02:32
The NEXUSX target was missing USE_MAG definition, which caused all
magnetometer-related CLI settings to be unavailable. Users received
"Invalid name" errors when attempting to configure align_mag_roll,
align_mag_pitch, align_mag_yaw, and other compass settings.

Changes:
- Added USE_MAG to NEXUSX target.h
- Configured MAG_I2C_BUS to use I2C3 (same bus as barometer)
- Enables external magnetometer support for GPS navigation

Hardware compatibility:
- NEXUSX has I2C3 available (SCL: PA8, SDA: PC9)
- Barometer already on I2C3 (SPL06)

Testing:
- Built NEXUSX target successfully
- Verified settings present in binary via strings command
- All compass settings now available in settings table:
  * align_mag_roll, align_mag_pitch, align_mag_yaw
  * mag_hardware, mag_declination
  * magzero_x/y/z, maggain_x/y/z
  * mag_calibration_time
updated link to Oscar Liang's guide
I2C3 is not physically accessible on NEXUSX hardware.
Changed MAG_I2C_BUS from BUS_I2C3 to DEFAULT_I2C (BUS_I2C2).
Added USE_MAG_ALL for auto-detection of magnetometer models.
The Puya PY25Q128HA is a W25Q128-compatible 128Mbit (16MB) SPI NOR flash
chip. This PR adds detection support by including its JEDEC ID in the flash
configuration table.

Changes:
- Added PY25Q128HA JEDEC ID (0x856018) to m25p16FlashConfig[] array
- Updated Blackbox documentation with PY25Q128HA in supported chips list

The chip uses the same SPI command set as other supported flash chips,
so no driver modifications are required beyond adding the JEDEC ID for
auto-detection during initialization.
Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
Co-authored-by: qodo-code-review[bot] <151058649+qodo-code-review[bot]@users.noreply.github.com>
…support

Fix missing magnetometer support on NEXUSX target
Returns 8-byte bitmask indicating which logic conditions differ from defaults.
Enables configurator optimization to reduce MSP requests from 64 to 1+N.
…-enabled-mask

Add MSP2_INAV_LOGIC_CONDITIONS_CONFIGURED command to make the OSD and programming tabs load much faster
Two bugs found by cppcheck static analysis:

1. fc/config.h:66 - Integer overflow in FEATURE_FW_AUTOTRIM
   - `1 << 31` could cause signed integer overflow (undefined behavior in C)
   - Fixed by using `1U << 31` for unsigned shift

2. sensors/temperature.c:101 - Buffer overrun in memset
   - sizeof(array) is already the size in bytes, so should not be multiplied by element size.
   - Fixed by using just `sizeof(sensorStatus)`
CRSF buffer overflow (rx/crsf.c):
- fullFrameLength computed from untrusted frameLength field
- Malformed packet with large frameLength could overflow crsfFrame.bytes[]
- Added bounds check against CRSF_FRAME_SIZE_MAX before writing

Dashboard sizeof bug (io/dashboard.c):
- tickerCharacters was a pointer, so sizeof() returned pointer size (4/8)
- On 64-bit systems, TICKER_CHARACTER_COUNT was 8 instead of 4
- Could read past end of string when indexing tickerCharacters[]
- Changed to array declaration and sizeof()-1 for correct count

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

Co-Authored-By: Claude <noreply@anthropic.com>
sensei-hacker and others added 30 commits March 2, 2026 13:37
… error

The --target flag was passing the inav commit SHA to gh release create
in iNavFlight/pr-test-builds. That SHA does not exist in that repo so
GitHub rejected it with HTTP 422 "Release.target_commitish is invalid".

Remove --target so the release is anchored to the default branch (main)
of pr-test-builds, which is the correct behaviour for a binary hosting
repo.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t-commitish

CI: fix pr-test-builds release creation
Create per-pin AF lookup tables (bus_spi_stm32h7xx.h and
bus_spi_stm32f7xx.h) and use them in bus_spi_hal_ll.c to
automatically resolve the correct GPIO AF for each SPI pin.

Previously, SPI3 on STM32H743 applied AF6 to all pins. On H743,
AF6 on PB5 is SPI3_MISO - the MOSI function requires AF7. Targets
routing SPI3_MOSI to PB5 (e.g. HAKRCH743 MAX7456 OSD) received no
MOSI signal. Targets may still define SPI*_SCK/MISO/MOSI_AF in
target.h to override the table.
Both bus_spi_stm32h7xx.h and bus_spi_stm32f7xx.h use CONCAT4 but relied
on transitive includes from the including translation unit to provide it.
Add an explicit include to make the dependency self-contained.
check_linker_flag() requires CMake 3.18. Use include(CheckLinkerFlag OPTIONAL)
and if(COMMAND check_linker_flag) to probe for the module's availability rather
than hardcoding a version number. On CMake < 3.18 the include silently does
nothing, the guard skips the call, and LINKER_SUPPORTS_NO_RWX_WARNING is left
unset — the flag is simply not added, which is safe because linkers old enough
to ship with CMake < 3.18 do not produce the RWX warning anyway.
Trackback flight controller lock up fix
Multicopter althold altitude adjustment manual climb rate fix
Multifunction add battery voltage warnings
Replace three uses of double-precision library functions with their
float equivalents, eliminating software-emulated double math on the
Cortex-M7 FPV5-SP-D16 (single-precision-only) FPU:

- gps_ublox.c: atof() -> fastA2F() in gpsDecodeProtocolVersion().
  atof() pulled in libc_nano strtod (28 KB of double-precision parsing
  machinery) to parse simple version strings like "18.00". fastA2F()
  is already in the codebase and covers this use case.

- maths.c: exp/pow (double) -> expf/powf in gaussian().
  The explicit (double) casts defeated the -fsingle-precision-constant
  flag. gaussian() is called from the IMU loop at up to 1000 Hz, so
  switching to hardware-accelerated single-precision also improves
  runtime performance.

- vtx_smartaudio.c: pow(10.0, ...) -> powf(10.0f, ...) in saDbiToMw().
  Combined with the maths.c change, removes all callers of double pow,
  dropping libm e_pow.o from the link entirely.

Flash savings on MATEKF722 (STM32F722, 512 KB):
  text: -16,560 B  data: -376 B  total: -16,936 B (~16.5 KB)
Follow-up to the single-precision math change that saves ~17 KB of
flash on STM32F722 targets:

- maths.c: Replace powf(x, 2.0f) with explicit multiplies in
  gaussian(). Clearer intent and avoids any dependency on libm
  reducing integer-exponent powf to a multiply.

- vtx_smartaudio.c: Add roundf() before uint16_t cast in saDbiToMw().
  powf(10.0f, 1.0f) may return 9.999...f on some libm implementations,
  which would truncate to 9 mW instead of the correct 10 mW. roundf()
  closes the hazard at the cost of one FPU instruction.
Fix SPI GPIO alternate function assignment on STM32H7/F7
…mands

Comment 16 MSP commands as deprecated (for removal in INAV 10 or 11)
…isarm

Fix servo throttle mix outputting wrong position when disarmed
Fix SD card busy-wait loops that can lock up flight controller
Fix USB VCP lockup on disconnect (issue #11348)
…iles

Rename profile commands to control_profile
Fix hard faults when handling large MSP responses over CRSF
Add Loiter to LED control on mode flight
…r-flag

cmake/sitl: use CheckLinkerFlag instead of GCC version check for --no-warn-rwx-segments
Position estimator corrections improvement and estimated velocity filtering
…-math

Use single-precision math to save ~17 KB of flash on F722 targets
Bugfix: SDIO capacity shows incorrectly on F4 devices
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.