ModeManagement caches the most recent config_control_setpoints entry per
source_id (one per external mode) and reads it on every nav_state change
to decide which flight controllers to enable. The cache was read verbatim
regardless of when the entry was written, so a contract authored during
an earlier activation of the same mode -- e.g. a ground configuration that
disables all controllers, followed by re-entering the same mode in the
air -- briefly forced the new activation onto a controller configuration
intended for the previous one.
Stamp every cache write with the PX4-local receive time. On the first
updateControlMode() call for a new nav_state, refuse any cached entry
whose receive time predates the activation and publish the safe default
contract (every control loop enabled) instead, until a fresh entry arrives.
A single warning is emitted per activation when the fallback engages.
After sending reboot-to-bootloader, the PX4 USB CDC node briefly
disappears while the bootloader re-enumerates. Reopening the serial
port can land on a half-broken descriptor and the next tcdrain()
raises termios.error (5, 'Input/output error'). That bare OSError
escaped every retry layer and crashed the uploader, even though a
manual re-run would succeed once enumeration settled.
Convert OSError/SerialException from flush() and reset_buffers() into
the module's ConnectionError, matching how send()/recv() already
behave, and let the identify retry loops in _try_identify also catch
ConnectionError so a single transient I/O hiccup doesn't abort the
upload.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
The line "Priority is assigned automatically during calibration..."
added in #27393 duplicates information already conveyed by the
surrounding paragraph. Hamish flagged the redundancy in code review.
This PR was AI-assisted (Claude Code) and reviewed by a human
before submission.
Co-authored-by: _pmjn_ <pcminh170701@gmail.com>
* fix(drivers/ak09940a): fix probe retry, devtype collision, and register naming
* fix(drivers/neopixel): check init return value and fix module name typo
* fix(boards/3dr/ctrl-n1): correct magnetometer i2c bus, LED indexing, chip variant for bootloader, and TIM3 conflict with srgbled_dma
* fix(boards/3dr/ctrl-n1): update bootloader for STM32H743VI
* fix(simulation): correct apparent wind sign and fixed-wing pitot model in SIH
* fix(simulation): simplify pitot model to always use body-x airspeed
---------
Co-authored-by: 0xDI <0xDI@users.noreply.github.com>
Add SENS_AFBR_ROT as the single source of truth for the AFBR-S50
mounting orientation and drop the -r CLI flag.
The -r flag was already non-functional: the getopt string declared
it without a trailing ':', so the case body called atoi(nullptr).
Removing it is harmless and avoids ambiguity between "user did not
pass -r" and "user explicitly passed -r 25".
The driver now reads orientation from SENS_AFBR_ROT in the
constructor. distance_sensor_s::ROTATION_* is a discontinuous enum
(0-7, 24, 25), and the param schema can't express that natively, so
the driver validates at start and falls back to ROTATION_DOWNWARD_FACING
on out-of-set values.
* fix(drivers/distance_sensor/vl53l1x): added median filtering and hysteresis based quality
* fix(drivers/distance_sensor/vl53l1x): revert back to 100/0 quality
Vendor-specific airframes (Holybro, UVify, ATL, COEX, Bitcraze,
ThunderFly, Applied Aeronautics) are not relevant on the ARK FMU
boards and only consume flash. Add an rc.board_airframes whitelist
to ark_fmu-v6x and ark_fmu-v6s that keeps only the generic
multirotor, fixed-wing, VTOL, and rover frame types.
Flash savings (default variant):
ark_fmu-v6x: 1965708 -> 1957772 B (-7936 B, free 372 -> 8308 B)
ark_fmu-v6s: 1960212 -> 1945748 B (-14464 B, free 8108 -> 22572 B)
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* navigator: check geofence dataman update failures
* navigator: fix geofence import state handling
- Move the import success log after the dataman state write succeeds
- Store the active fence dataman id in the stats entry
- Add error logs before geofence import failure exits