Skip to content

Commit

Permalink
commander: Provide feedback that preflight check failed.
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzMeier committed Apr 20, 2015
1 parent 17e487c commit 0a526e2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/modules/commander/state_machine_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0a526e2

Please sign in to comment.