diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2015-04-20 09:13:31 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2015-04-20 09:14:14 +0200 |
commit | 0a526e2a5f1b62c3258f6c629da50a595422b447 (patch) | |
tree | 2454c227ac11b176c9377863302483869f2e3744 /src | |
parent | 17e487cad4f618b9ee819367fc9f1157169622ae (diff) | |
download | px4-firmware-0a526e2a5f1b62c3258f6c629da50a595422b447.tar.gz px4-firmware-0a526e2a5f1b62c3258f6c629da50a595422b447.tar.bz2 px4-firmware-0a526e2a5f1b62c3258f6c629da50a595422b447.zip |
commander: Provide feedback that preflight check failed.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/commander/state_machine_helper.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/commander/state_machine_helper.cpp b/src/modules/commander/state_machine_helper.cpp index c7dabee7e..7410baca3 100644 --- a/src/modules/commander/state_machine_helper.cpp +++ b/src/modules/commander/state_machine_helper.cpp @@ -219,9 +219,12 @@ arming_state_transition(struct vehicle_status_s *status, ///< current vehicle s /* 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"); + new_arming_state == vehicle_status_s::ARMING_STATE_ARMED) { + if (status->condition_system_sensors_initialized) { + mavlink_log_critical(mavlink_fd, "Preflight check now OK, power cycle before arming"); + } else { + mavlink_log_critical(mavlink_fd, "Preflight check failed, refusing to arm"); + } feedback_provided = true; } |