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.
Previously, when deferring was active and e.g. RC loss was triggered, and
RC regained, the action was not cleared, as the RC loss action only clears
on mode switch/disarm (when set to RTL for example).
When deferring was then disabled, the RC loss failsafe would still trigger.
This changes the behavior to immediately remove those actions when
deferring is active.
It also ensures to reset the Hold delay when deferring is disabled and no
failsafe is being deferred.
* Doc Orbit: update and clarify configurability and behavior around limits
* run prettier
* Fix up link to table
---------
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
dshot: fix motor test on CANnode
Also includes fixes for the DShot driver since stop_outputs is removed. The esc info command has been removed because it doesn't work with AM32, can only be used via command line, and complicates the driver
This fixes a number of issues with uavcan ESC control.
- Motor Testing when using a CANnode as a PWM expander now works by allowing the FunctionMotors class to perform prearm control
- The esc.RawCommand message is now always published for configured uavcan ESC outputs. Previously prior to arming the message would be published empty, which causes certain ESCs to enter an error state.
- Useless and redundant code has been removed and small name changes have been applied.
Even though all enum values fit into 13 bits, there's an error:
../../src/drivers/gnss/septentrio/sbf/messages.h:101:21: error: ‘septentrio::sbf::Header::id_number’ is too small to hold all values of ‘enum class septentrio::sbf::BlockID’ [-Werror]
This is with GCC 13.3.0 under Ubuntu 24.04
From https://github.com/google/fuzztest.
This will now also add gtest (via cmake FetchContent)
And requires newer cmake (container updates):
CMake 3.19 or higher is required. You are running version 3.16.3
For delivery use-case, the mission contains a land item followed by other mission items. For the
section after the land, the current sequence number is greater than the land start index. If an RTL
is triggered, then isLanding returns true and the vehicle continues with the mission instead of
executing the RTL.
The land index marks the actual landing. So, is landing should only be true for the items between
land_start_index and land_index. If there are items after the land index, then they don't belong
to the landing anymore.
code was checking for an updated MissionResult twice in a row, leading to _mission_state
not being set correctly when the second check had no new message.
Switched to SubscriptionData to safely retrieve the latest message using .get().