[pull] master from iNavFlight:master#22
Open
pull[bot] wants to merge 6869 commits into
Open
Conversation
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.
…unter underflow Two issues in the EN-bit wait loop added to impl_timerPWMPrepareDMA(): 1. On timeout, the early return skipped setting tch->dmaState, leaving it in whatever state it had on entry (could be TCH_DMA_ACTIVE if the DMA TC interrupt was suppressed by the preceding ATOMIC_BLOCK). Subsequent calls to impl_timerPWMStartDMA() check for TCH_DMA_READY, so an ACTIVE or stale state would not cause a spurious fire, but timer.c timerIsMotorBusy() uses dmaState != TCH_DMA_IDLE as a busy check, which would return true forever on a stuck channel. Fix: explicitly set TCH_DMA_IDLE on timeout. 2. The while-loop condition used post-decrement (timeout--), causing the counter to wrap from 0 to UINT32_MAX on the final iteration. The counter is not used after the loop so this was harmless, but the pattern is fragile and easy to misread. Fix: use a for-loop where timeout decrements cleanly to 0 and the loop exit condition is unambiguous.
… fault The timeout (~140-230 us at 216 MHz) is long enough that any in-progress DMA transfer has certainly completed or been aborted by the time it expires. The stuck EN bit means we cannot reconfigure DMA registers this cycle, not that the hardware is permanently broken. Update the comment to reflect that: the ESC holds its last command for one missed frame, and EN will almost certainly have cleared before the next PrepareDMA call (~1-2 ms later).
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.
…_0 flag from target.h file
Add AGENT.md rules
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.
Replace 81 tfp_sprintf calls in osd.c with lightweight helpers that skip format-string parsing overhead: - osdFormatIntUnit: replaces "%Nd" and "%Nd%c" patterns (47 calls) - osdWriteChar/osdWriteChar2: replaces "%c" and "%c%c" (33 calls) - osdFormatTime_MMSS: replaces "%02d:%02d" pattern (2 calls) Removes one dead null-terminator write and collapses a redundant RSSI_DBM branch that became identical after conversion.
Fix SPI GPIO alternate function assignment on STM32H7/F7
add HAKRCH743 target
…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
* timeUnixUsec is declared as timeUs_t ... * The new SoftRF section says SYS_STATUS, VFR_HUD, and ATTITUDE are “not supported”, .... * Spelling/casing: the receiver name is “SoftRF” ... * Spelling/casing: use “MAVLink” ... * Formatting deviates from the prevailing style i ... * The comment on the EXTRA2 stream rate still says “HEARTBEATs are important” ...
* fix mavlink data stream, create new schedule for HB and sys time
* Add new target: AEDROXH7 (Airbot Systems AEDROX H7) STM32H743 flight controller with ICM42688P gyro, W25N01G NAND flash, DPS310 baro, MAX7456 analog OSD, HD OSD via MSP DisplayPort, and 8 motor outputs split across TIM1 and TIM8. SPI3 MOSI on PB2 requires explicit GPIO_AF7_SPI3 override. Magnetometer enabled on I2C1 (hardware present, not in BF config). * AEDROXH7: replace UART4 with DroneCAN on PD0/PD1 PD0/PD1 connect to the CAN transceiver (CANL/CANH pads visible on board), not to a user-accessible UART4 header. Replace UART4 with USE_DRONECAN defines. CAN standby pin TBD pending INAV syntax confirmation. * AEDROXH7: add CAN1_STANDBY PD3 (not yet tested) * CI: re-trigger build to pick up fc_msp.c sign-compare fix in maintenance-9.x
…top functions STM32 RM (RM0090 §10.3.17) requires disabling the timer DMA request before disabling the DMA stream. The previous code had this backwards in five places across three driver files, creating a race window where the timer could issue a DMA request to an already-disabled stream. The incorrect ordering: DMA_Cmd(stream, DISABLE); // stream disabled first TIM_DMACmd(tim, source, DISABLE); // timer request disabled second Corrected ordering: TIM_DMACmd(tim, source, DISABLE); // timer request disabled first DMA_Cmd(stream, DISABLE); // stream disabled second Affected locations: - timer_impl_stdperiph.c: impl_timerPWMStopDMA, impl_timerPWMPrepareDMA, DMA TC IRQ handler - timer_impl_stdperiph_at32.c: impl_timerPWMStopDMA - timer_impl_hal.c: DMA TC IRQ handler The correct ordering was already used in impl_timerPWMSetDMACircular (both stdperiph files) and impl_timerPWMStopDMA (HAL file), which serve as the reference implementation.
Removed redundant phrases and clarified manufacturer information.
# Conflicts: # src/main/io/osd.c
[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
Bump firmware version to 9.1.0
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
- 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.
9.1 catch up
Release/9.1 to master
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )