* fix(commander): add tab character to critical system loss messages
* fix(commander): extend timeout for traffic avoidance system heartbeat check
* Commander: Only Warn the user about traffic avoidance system loss if COM_ARM_TRAFF is set
Signed-off-by: Claudio Micheli <claudio@auterion.com>
---------
Signed-off-by: Claudio Micheli <claudio@auterion.com>
Co-authored-by: Claudio Micheli <claudio@auterion.com>
The failure_detector_status bitmask in vehicle_status duplicates the
separate FailureDetectorStatus topic. Remove it and read directly from
the dedicated topic in failureDetectorCheck and HIGH_LATENCY2.
Extend the arm throttle safety check to all vehicle types including
rovers, which were previously excluded. Unify the two separate throttle
checks into a single evaluation at arm-time that accounts for vehicle
type and control mode: rovers require centered stick, climb-rate modes
require stick at or below center, and manual/stab/acro modes require
stick at bottom.
Overhauls the DShot driver with per-timer BDShot selection, multi-timer
sequential capture, Extended DShot Telemetry (EDT), and AM32 ESC EEPROM
read/write via MAVLink. Expands ESC support from 8 to 12 channels.
BDShot:
- Per-timer BDShot protocol selection via actuator config UI
- Multi-timer sequential burst/capture on any DMA-capable timer
- Adaptive per-channel GCR bitstream decoding
- Per-channel online/offline detection with hysteresis
Extended DShot Telemetry (EDT):
- Temperature, voltage, current from BDShot frames (no serial wire)
- New DSHOT_BIDIR_EDT parameter
- EDT data merged with serial telemetry when both available
AM32 EEPROM:
- Read/write AM32 ESC settings via MAVLink ESC_EEPROM message
- ESCSettingsInterface abstraction for future ESC firmware types
- New DSHOT_ESC_TYPE parameter
Other changes:
- Per-motor pole count params DSHOT_MOT_POL1–12 (replaces MOT_POLE_COUNT)
- EscStatus/EscReport expanded to 12 ESCs with uint16 bitmasks
- Numerous bounds-check, overflow, and concurrency fixes
- Updated DShot documentation
On Linux targets with high-rate external sensor data (>1000Hz), all
sensor calibrations (gyro, accel, mag) can freeze PX4 by starving
other threads of CPU. Normal flight is unaffected — only calibration
triggers the problem.
Two compounding issues in the calibration worker threads:
1. calibrate_cancel_check() creates a new uORB::Subscription on every
call, which triggers getDeviceNodeLocked() — an O(n) linear strcmp
scan through all uORB nodes. In gyro/mag calibration this was called
on every sensor sample, consuming the majority of CPU in strcmp alone.
2. SubscriptionBlocking::updatedBlocking() returns immediately when data
is already available (it only blocks when no data is pending). With
continuous high-rate sensor data, the calibration loops never yield,
spinning at 100% CPU.
These problems are addressed with this patch as follows:
- Throttle calibrate_cancel_check() to once per 200ms in gyro
and mag calibration loops.
- Add 1ms px4_usleep() yield before updatedBlocking()/updateBlocking()
in all calibration loops (gyro, accel, mag, orientation detection).
This caps the effective loop rate at ~1000Hz — still far above what
calibration needs (250-750 samples).
- Force Commander main loop to sleep during calibration so it does not
compete with calibration worker threads for CPU.
Tested under Linux (x64, aarch64) both with RT and non-RT scheduling,
with sensor data arriving at ~3600Hz. Calibration completes normally
and no longer results in a deadlocked process.
* added vehicle command and support to remotely activate/deactivate the safety system (#26078)
* added print_status support for prearm safety status
* updated safety button to map to MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = '5300'
* safety switch cmd: fixed incorrect catch-all and added commanded_state variable for easier reading
When operating fully autonomously (i.e., without manual control or a guaranteed link to the ground station), tuning a vehicle can be difficult since the current autotune process requires either RC input or a GCS command. For these scenarios, it it useful to be able to start autotune inside a mission.
The mode executor can run land mode which updates the home position to the landing location. This
can be not the desirable behavior and the home position should stay at the original location.
A flag is added to the configuration overrides to control if the home position is updated or not.
-add new NAVIGATION_STATE_ALTITUDE_VOYAGER
-this mode does require manual control to enter
-but you can disable the manual control loss failsafe to continue
flying in case of manual control loss
-for MC: in throttle and yaw are controlled like in Altitude mode,
the tilt is controlled via integrated rate input (similar to Acro,
but with tilt limit)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* rft: clean merge to PX4
* fix: formatting
* fix: extra line
* fix: moved submarine out of "is_ground_vehicle", added proper check for center-throttle
* feat: updated gazebo models to include bluerov update
* fix: use 'is_uuv_vehicle', remove FW_MM/LLC from uuv build
* fix: added saturation to thrust and torque messages via param
* doc: updated parameters documentation for uuv
* fix: formatting
* feat: matching hardware reference
* fix: thrusters kg
* rft: removed commented lines
* fix: update gz reference given hw setup
* fix: hardware references
* fix: recommendations
* fix: updated settings to match hardware
* rft: check only for fixed and rotary wing for high throttle
Co-authored-by: Daniel Agar <daniel@agar.ca>
* fix: commit oupsie
* fix: format
* rft: remove is_uuv
* fix: hw parameters, uuv build target for v6x
* feat: added support for D-pad attitude changes in stabilized position control
* fix: position setpoint update and parametrized trajectory age and att change
* fix: format
* fix: removed duplicated call to check_validity_setpoint
* fix: setpoint update on arming logic
* fix: setpoint initialization for stabilized mode
---------
Co-authored-by: Daniel Agar <daniel@agar.ca>
According to the mavlink spec we should be publishing the home attitude
as a quaternion rather than just the yaw/heading.
Additionally, this allows setting the landing roll and pitch angle using
DO_SET_HOME (this yet needs to go into the MAVLink spec though).
This time including the message versioning and translation.
There was a race condition: for example when an external mode disabled
failsafe deferring, that then triggered a failsafe, while the mode executor
immediately sends a command (to e.g. switch modes).
In that case the failsafe got triggered but the mode switch was still
allowed.
This was because of the processing ordering:
- mode updates (and propagating the failsafe_action_active state)
- failsafe updates
- command handling
This patch makes sure failsafe_action_active is set immediately after
updating the failsafes.
According to the mavlink spec we should be publishing the home attitude
as a quaternion rather than just the yaw/heading.
Additionally, this allows setting the landing roll and pitch angle using
DO_SET_HOME (this yet needs to go into the MAVLink spec though).
When a mission finishes with an RTL command, there's a race condition
between:
1. RTL command setting user_mode_intention RTL
2. Mission completion logic forcing LOITER
The auto-loiter transition was checking current nav_state (which is
still AUTO_MISSION) instead of any pending user_mode_intention,
causing it to override the RTL request.
Fix: Only auto-transition to loiter if no mode change is already
pending.
Within the first 2min of a flight, check if the integrated GNSS vertical velocity and the baro
measurements disagree with the reported GNSS altitude, and in that case update the
set home position altitude to cancel out GNSS altitude drift.
* prevent re-init when reaching negative altitudes
* only allow correction during the first 120 second after takeoff
* add dependency to COM_HOME_EN parameter. reset vel-integral for multiple takeoffs
Replaced the local variable landed_amid_mission with the class member _mission_in_progress for consistency and to reduce redundancy.
No functional change.
Setting "lockdown" disables the actuators. In this mode,
"force_failsafe" has no effect as the actuators are disabled, so the
parachute is not getting released as it requires the output to change to
its failsafe value.
Previously, when requesting a mode switch to Position without a valid
position estimate through an RC button, the mode change to Position mode
was not rejected if COM_POSCTL_NAVL was set to 1 and instead the system
switched to Altitude mode.
If the mode request instead came in through MAVLink it was rejected.
This commit aligns the two ways of changing a flight mode.
Signed-off-by: Silvan <silvan@auterion.com>