mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Prearm check: provide user instruction to power cycle if things look good
This commit is contained in:
parent
554719c78f
commit
c92afb99b6
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user