commander state machine helper shorten names

This commit is contained in:
Daniel Agar
2018-03-29 20:14:20 -04:00
parent 8a7dc1b320
commit 35bf37d617
@@ -75,13 +75,13 @@ static constexpr const bool arming_transitions[vehicle_status_s::ARMING_STATE_MA
};
// You can index into the array with an arming_state_t in order to get its textual representation
const char *const arming_state_names[vehicle_status_s::ARMING_STATE_MAX] = {
"ARMING_STATE_INIT",
"ARMING_STATE_STANDBY",
"ARMING_STATE_ARMED",
"ARMING_STATE_STANDBY_ERROR",
"ARMING_STATE_REBOOT",
"ARMING_STATE_IN_AIR_RESTORE",
const char * const arming_state_names[vehicle_status_s::ARMING_STATE_MAX] = {
"INIT",
"STANDBY",
"ARMED",
"STANDBY_ERROR",
"REBOOT",
"IN_AIR_RESTORE",
};
static hrt_abstime last_preflight_check = 0; ///< initialize so it gets checked immediately
@@ -339,7 +339,7 @@ transition_result_t arming_state_transition(vehicle_status_s *status, const batt
if (ret == TRANSITION_DENIED) {
/* print to MAVLink and console if we didn't provide any feedback yet */
if (!feedback_provided) {
mavlink_log_critical(mavlink_log_pub, "TRANSITION_DENIED: %s - %s",
mavlink_log_critical(mavlink_log_pub, "TRANSITION_DENIED: %s to %s",
arming_state_names[status->arming_state], arming_state_names[new_arming_state]);
}
}