Heading mode (CONDITION_YAW / airspeed-direction control) is extracted
from the Course flight mode. The mode now exclusively tracks ground
course, with no fallback to heading hold on GPS/velocity loss.
Changes:
- Remove ControlMode enum, _heading member, and set_heading() from
Course navigator mode
- Remove on_active() fallback that switched to heading on velocity loss
- Simplify update_setpoint_triplet() to always set course (yaw=NAN)
- Remove CONDITION_YAW handler in navigator_main
- Remove VEHICLE_CMD_CONDITION_YAW case from Commander
- Remove Heading Hold branch in FixedWingModeManager::control_auto_position()
- Update early-return guard in control_auto() to check only course
Signed-off-by: mahima-yoga <mahima@auterion.com>
This changes the guard to v_xy_valid (horizontal velocity estimate), which also holds
during dead-reckoning.
- Replace gps_position_valid() with v_xy_valid in set_course() and on_activation()
- Initialise course from velocity vector (atan2(vy, vx)) instead of heading
- Guard lat/lon with xy_global in both course and heading branches
- Fall back to heading mode automatically if velocity estimate is lost
- Introduce ControlMode enum replacing the _use_heading bool
- Rename update_course_setpoint() to update_setpoint_triplet()
Place firmware .bin files at the SD card root or staging directory
(/fs/microsd/ufw_staging/); on boot the UAVCAN server migrates them
to /fs/microsd/ufw/ and updates FW.db, then flashes any connected
node whose firmware version mismatches.
- Add firmware migration from SD root and staging dir into /fs/microsd/ufw/
- Maintain FW.db flat-file database mapping board IDs to original filenames
- Use cache-aligned DMA-safe read/write buffers (required on STM32H7)
- Add Tools/auterion/remote_update_fmu.sh for SSH-based FMU+canio updates
The current preflight check works by sending individual actuator
commands over mavlink. This can only be done sequentially, so the
surfaces do not move in a coordinated way, instilling little confidence.
To alleviate, this adds a control surface preflight check which causes
the allocator to command torque in the given direction, so the control
surfaces move as they would in flight.
Triggered by `{MAV,VEHICLE}_CMD_ACTUATOR_GROUP_TEST`. Only runs when
pre-armed (control surfaces, tilts) or armed (thrust). Test runs for 0.5
seconds -- for longer duration, send repeatedly from the GS.
Check is rejected in flight and cancelled when nav_state changes.
- Expose overrideCollectiveTilt in ActuatorEffectiveness, empty base, only overridden for Tiltrotor
- Allow giving collective tilt that is used in updateSetpoint in place
of command from tiltrotor_extra_controls
- Needs to be called with do_override = false to clear override
- add comment explaining technical debt
Update safety.md, peripherals/parachute.md, and releases/main.md to document the extended COM_PARACHUTE parameter and the new configurable in-flight failsafe behaviour.
01abe35563 introduced a handler for the
`MAV_CMD_DO_SET_MODE` enum, which directly forwards a vehicle command
into uORB. It did not disable immediate acknowledgement of this command directly in `mavlink_receiver`. This means that the command is always ack'd once with ACCEPTED prior to the ack issued from Commander
The fix is to set `send_ack=false` immediately after dispatching the
command message to uORB in mavlink receiver
* fix(dshot): send motor stop for 3D mode deadzone instead of min throttle
In DShot 3D mode, convert_output_to_3d_scaling() returns DSHOT_DISARM_VALUE
(0) for deadzone inputs. But up_dshot_motor_data_set() adds the MIN_throttle
offset (+48), causing motors to spin at minimum throttle instead of stopping.
Check the result of calculate_output_value() for DSHOT_DISARM_VALUE and send
an explicit motor stop command, bypassing the +48 offset.
* fix(dshot): make 3D deadband inclusive on both ends
Change the 3D deadband check from [L, H) to [L, H] so that setting
DSHOT_3D_DEAD_L equal to DSHOT_3D_DEAD_H (both default to 1000) produces
a single-point deadband at that value, matching the natural reading of
"between L and H" in the param description.
Clarify the DSHOT_3D_DEAD_L/H param descriptions to state the range is
inclusive and note the L=H default behavior.
NuttX builds into the shared submodule trees at
platforms/nuttx/NuttX/{nuttx,apps}, not into per-board build/<target>/.
Its recursive make does not treat PX4 defconfig changes as a reason to
recompile, so switching board configs links stale objects from the
previous config (e.g. kmm_* and stm32_spi4select from a protected/fmu-v5
build into a later flat/ark_fmu-v6x build), and the kernel ELF fails to
link with hundreds of undefined references.
Tools/ci/build_all_runner.sh already handled this in CI by wiping the
submodules between iterations. Bring the same fix to local builds: stamp
the active target in build/.last_target and run git clean -dXfq on both
NuttX submodules when it changes. Same-target rebuilds, which #27324
made cheap, stay unaffected (no-op rebuild remains ~0.14 s).
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
A successful I2C::init() attaches to the bus (per-platform: NuttX
i2c_master_s* via px4_i2cbus_initialize, POSIX /dev/i2c-N fd via
::open, QuRT bus fd via _config_i2c_bus). Only the destructor releases
it. The init() implementations on all three platforms unconditionally
re-attached on every call, so any driver that called init() more than
once on the same instance leaked:
- NuttX: kmm_malloc() of a fresh i2c_master_s inst, plus an unbalanced
increment of the per-port refcount in stm32_i2cbus_initialize() (and
the equivalent across other arch ports). The previous inst pointer
was overwritten and the matching uninitialize() never ran, so the
bus refcount could not reach zero on destruct.
- POSIX/QuRT: file descriptor leak (re-open without close).
The pattern that triggers this is "init() retried on failure," used in
keep_running mode and in drivers like INA228 whose RunImpl re-enters
init() whenever a later step (e.g. a register write) failed. Drivers
that init() exactly once from instantiate() were unaffected.
Mirror what SPI::init() (nuttx/SPI.cpp) already does for its bus-bind
step and short-circuit on second-and-later calls. Re-running probe()
and CDev::init() on an already-attached device was also avoided here
because the existing cleanup path on probe failure would tear down the
preserved _dev that earlier callers still depended on.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
PR #27324 swapped find_package(PythonInterp) for find_package(Python3),
whose macOS defaults (FRAMEWORK=FIRST, STRATEGY=VERSION) override
Python3_ROOT_DIR and PATH to resolve the highest-versioned framework
Python. CI then matched Homebrew's 3.14 while pip installed kconfiglib
into the actions/setup-python 3.10 venv, breaking `make px4_sitl`
configure with "No module named menuconfig".
Pin Python3_EXECUTABLE to .venv/bin/python when present (macos.sh
creates the venv but neither it nor CI exports VIRTUAL_ENV), and set
FIND_STRATEGY=LOCATION + FIND_FRAMEWORK=LAST so dev machines and Linux
containers without a venv still pick the interpreter that has the
project's pip dependencies.