* fix(docs): invert vectorized diagram SVGs in dark mode
* docs(docs): Apply fix as a class
* Add yarn lock to fix CI
---------
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
* fix(i2c_spi): prevent use-after-free when stopping driver instances
module_stop() deleted each instance before unlinking it from the global
i2c_spi_module_instances list. The instance *is* the intrusive list node,
so removeInstance()/List::remove() then dereferenced the freed node to fix
up the links. If another thread reused that heap block in the window, the
list got corrupted, sporadically leaving instances linked (a later start
reports "already running") or hard-faulting. This regressed in the 2020
array->linked-list refactor: the old array version only nulled an array
slot after delete, which was safe.
Unlink each instance before freeing it. Also only delete/unlink when the
task actually exited: if request_stop_and_wait() times out the work queue
may still reference the object, so leave it allocated and listed rather
than freeing it. module_stop() now returns -1 when an instance failed to
stop.
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* Update platforms/common/i2c_spi_buses.cpp
* Update platforms/common/i2c_spi_buses.cpp
---------
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
* failsafe: prevent manual fallback without RC
* fix(commander): consolidate manual fallback RC loss handling
Use NAV_RCL_ACT from a single post-cascade check for manual fallback modes,
and add coverage for non-default NAV_RCL_ACT behavior.
Cross-correlation scripts to measure CAN transport delay from flight
logs. Compares CAN sensor signals against the FC's directly-connected
IMU to estimate the total pipeline latency.
- range_sensor_latency.py: cross-correlates range rate with IMU-derived
vertical velocity
- flow_sensor_latency.py: cross-correlates flow sensor gyro with FC gyro
* platforms/common/uORB/uORB.h: Add definition for orb_sub_t and handle check functions
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
* uORB: Change subscriber id:s from int to orb_sub_t
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
* uxrce_dds_client: Change polling of transport device from px4_poll to poll
Use posix poll directly, there is no need to use px4_poll unless uORBs are
being polled.
The one used here is a normal filesystem/device poll, so we can use normal "poll",
this is the common pattern in the codebase.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
* Fix linking for protected build
This fixes errors for memalign not linking on some configurations.
Memalign exists in nuttx kernel-side mm library and it may fail in configurations
where kernel and userspace are separated. This has no effect on other than
"CONFIG_BUILD_PROTECTED" or "CONFIG_BUILD_KERNEL" NuttX builds.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
---------
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
Co-authored-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
* feat(Commander): add COM_FLTMODE_BOOT parameter for configurable flight mode on boot
This adds COM_FLTMODE_BOOT, an enum parameter (Altitude/Position/Hold/Stabilized, default Hold) that controls the nav_state set on boot, before any user mode command is received.
The navStateFromParam() translation function (previously a ManualControl method) has been moved to mode_util::navStateFromFlightModeParam() in ModeUtil/conversions.hpp so COM_FLTMODE_BOOT can follow the same enumeration as COM_FLTMODE* params.
* chore(commander): use nav_state for mode mapping
* feat(commander): extend list of modes available
* chore: fix style
* refactor(commander): simplify COM_FLTMODE_BOOT boot mode initialization
Apply the configured boot flight mode directly in the Commander
constructor.
Also removes the stick-presence-based mode logic (everHadModeChange
check in manualControlCheck), and changes the default to Position (NAVIGATION_STATE_POSCTL).
* chore: remove accidental whitespace
* chore: set default COM_FLTMODE_BOOT to Hold (nav_state 4)
* feat: add Takeoff state to COM_FLTMODE_BOOT
This fixes the issue that the External mdoes were all shifted down by one,
causing issues on the ground station with identifying the correct mode.
Signed-off-by: Silvan <silvan@auterion.com>
Option to keep a gimbal pointing at a fixed attitude, not linked to any user input.
Roll and Yaw angle setpoints are 0, Pitch can be set in separate parameter.
Both Vtx.msg and InputRc.msg exist upstream but were never wired up
as DDS topics. The VTX driver (added in c0c265cd) publishes vtx status
and InputRc has existed since 2015. Expose them over DDS so companion
computers and ROS2 nodes can monitor VTX state and raw RC input.
Signed-off-by: Phil-Engljaehringer <philipp.engljahringer@auterion.com>
#27605 gated the dshot/pwm_out start on `param compare -s PASSTHRU_EN 0`.
PASSTHRU_EN is registered only when the serialpassthrough driver is
compiled in, which is not the case on most boards (e.g. fmu-v5x). There
param_find() fails, `param compare` returns "no match", the else branch
runs, and the FMU outputs never start: the PWM_AUX group disappears from
the Actuators screen and motors wired to those pins won't arm. SITL uses a
separate init.d-posix rcS and is unaffected, so CI did not catch it.
Use the start-unless-explicitly-enabled idiom already used elsewhere in
rcS (`param greater -s`): only skip the outputs when PASSTHRU_EN is
explicitly > 0. A missing or zero parameter starts the outputs as before.