aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/commander/state_machine_helper.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/modules/commander/state_machine_helper.cpp b/src/modules/commander/state_machine_helper.cpp
index ccfc7a986..c7dabee7e 100644
--- a/src/modules/commander/state_machine_helper.cpp
+++ b/src/modules/commander/state_machine_helper.cpp
@@ -217,6 +217,14 @@ arming_state_transition(struct vehicle_status_s *status, ///< current vehicle s
status->arming_state = vehicle_status_s::ARMING_STATE_STANDBY_ERROR;
}
+ /* Check if we are trying to arm, checks look good but we are in STANDBY_ERROR */
+ if (status->arming_state == vehicle_status_s::ARMING_STATE_STANDBY_ERROR &&
+ new_arming_state == vehicle_status_s::ARMING_STATE_ARMED &&
+ status->condition_system_sensors_initialized) {
+ mavlink_log_critical(mavlink_fd, "Preflight check now OK, power cycle before arming");
+ feedback_provided = true;
+ }
+
// Finish up the state transition
if (valid_transition) {
armed->armed = new_arming_state == vehicle_status_s::ARMING_STATE_ARMED || new_arming_state == vehicle_status_s::ARMING_STATE_ARMED_ERROR;