forked from Archive/PX4-Autopilot
ArmStateMachine: port arming_state_names into the class
This commit is contained in:
parent
074080c816
commit
f968a5947d
|
@ -59,6 +59,16 @@ public:
|
|||
vehicle_status_flags_s &status_flags, const PreFlightCheck::arm_requirements_t &arm_requirements,
|
||||
const hrt_abstime &time_since_boot, arm_disarm_reason_t calling_reason);
|
||||
|
||||
// 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] = {
|
||||
"INIT",
|
||||
"STANDBY",
|
||||
"ARMED",
|
||||
"STANDBY_ERROR",
|
||||
"SHUTDOWN",
|
||||
"IN_AIR_RESTORE",
|
||||
};
|
||||
|
||||
private:
|
||||
static inline events::px4::enums::arming_state_t eventArmingState(uint8_t arming_state);
|
||||
|
||||
|
|
|
@ -465,7 +465,7 @@ int Commander::custom_command(int argc, char *argv[])
|
|||
|
||||
int Commander::print_status()
|
||||
{
|
||||
PX4_INFO("arming: %s", arming_state_names[_status.arming_state]);
|
||||
PX4_INFO("arming: %s", _arm_state_machine.arming_state_names[_status.arming_state]);
|
||||
PX4_INFO("navigation: %s", nav_state_names[_status.nav_state]);
|
||||
perf_print_counter(_loop_perf);
|
||||
perf_print_counter(_preflight_check_perf);
|
||||
|
|
|
@ -61,16 +61,6 @@ static constexpr const char reason_no_datalink[] = "no datalink";
|
|||
static constexpr const char reason_no_rc_and_no_datalink[] = "no RC and no datalink";
|
||||
static constexpr const char reason_no_gps[] = "no GPS";
|
||||
|
||||
// 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] = {
|
||||
"INIT",
|
||||
"STANDBY",
|
||||
"ARMED",
|
||||
"STANDBY_ERROR",
|
||||
"SHUTDOWN",
|
||||
"IN_AIR_RESTORE",
|
||||
};
|
||||
|
||||
// You can index into the array with an navigation_state_t in order to get its textual representation
|
||||
const char *const nav_state_names[vehicle_status_s::NAVIGATION_STATE_MAX] = {
|
||||
"MANUAL",
|
||||
|
|
Loading…
Reference in New Issue