diff options
author | Julian Oes <julian@oes.ch> | 2013-06-14 16:04:23 +0200 |
---|---|---|
committer | Julian Oes <julian@oes.ch> | 2013-06-14 16:04:23 +0200 |
commit | 5b21362e1ffefe4e28579eb7a853fe5d22288760 (patch) | |
tree | 5d95088b834b0e30b2e50c78b17c8afcb5ddb396 /src/modules/commander/state_machine_helper.c | |
parent | 90f5e30f2a177bed2ac08e76699ec3029292d640 (diff) | |
download | px4-firmware-5b21362e1ffefe4e28579eb7a853fe5d22288760.tar.gz px4-firmware-5b21362e1ffefe4e28579eb7a853fe5d22288760.tar.bz2 px4-firmware-5b21362e1ffefe4e28579eb7a853fe5d22288760.zip |
Arming with IO working now
Diffstat (limited to 'src/modules/commander/state_machine_helper.c')
-rw-r--r-- | src/modules/commander/state_machine_helper.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/commander/state_machine_helper.c b/src/modules/commander/state_machine_helper.c index fea7ee840..4f2fbc984 100644 --- a/src/modules/commander/state_machine_helper.c +++ b/src/modules/commander/state_machine_helper.c @@ -70,6 +70,7 @@ int arming_state_transition(int status_pub, struct vehicle_status_s *current_sta if (current_state->arming_state == ARMING_STATE_STANDBY) { ret = OK; safety->armed = false; + safety->ready_to_arm = false; } break; case ARMING_STATE_STANDBY: @@ -82,6 +83,7 @@ int arming_state_transition(int status_pub, struct vehicle_status_s *current_sta if (current_state->condition_system_sensors_initialized) { ret = OK; safety->armed = false; + safety->ready_to_arm = true; } else { mavlink_log_critical(mavlink_fd, "Rej. STANDBY state, sensors not initialized"); } @@ -115,6 +117,7 @@ int arming_state_transition(int status_pub, struct vehicle_status_s *current_sta || current_state->arming_state == ARMING_STATE_ARMED_ERROR) { ret = OK; safety->armed = false; + safety->ready_to_arm = false; } break; case ARMING_STATE_REBOOT: @@ -126,6 +129,7 @@ int arming_state_transition(int status_pub, struct vehicle_status_s *current_sta ret = OK; safety->armed = false; + safety->ready_to_arm = false; } break; |