aboutsummaryrefslogtreecommitdiff
path: root/apps/commander/state_machine_helper.c
diff options
context:
space:
mode:
authorJulian Oes <joes@student.ethz.ch>2013-03-25 14:53:54 -0700
committerJulian Oes <joes@student.ethz.ch>2013-03-25 14:53:54 -0700
commit3665d7b86fdbd8489099dafb436aaddcb816efde (patch)
tree624053f620eeeb7c9fc7d3fda6e74215486eea09 /apps/commander/state_machine_helper.c
parentb1e2011fcc068709574ddaab3d8bc831abcb7de8 (diff)
downloadpx4-firmware-3665d7b86fdbd8489099dafb436aaddcb816efde.tar.gz
px4-firmware-3665d7b86fdbd8489099dafb436aaddcb816efde.tar.bz2
px4-firmware-3665d7b86fdbd8489099dafb436aaddcb816efde.zip
Improved command handling, added a low priority task and various fixes
Diffstat (limited to 'apps/commander/state_machine_helper.c')
-rw-r--r--apps/commander/state_machine_helper.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/commander/state_machine_helper.c b/apps/commander/state_machine_helper.c
index 79394e2ba..ba01f8410 100644
--- a/apps/commander/state_machine_helper.c
+++ b/apps/commander/state_machine_helper.c
@@ -117,6 +117,22 @@ int arming_state_transition(int status_pub, struct vehicle_status_s *current_sta
current_state->flag_fmu_armed = false;
}
break;
+ case ARMING_STATE_REBOOT:
+
+ /* an armed error happens when ARMED obviously */
+ if (current_state->arming_state == ARMING_STATE_INIT
+ || current_state->arming_state == ARMING_STATE_STANDBY
+ || current_state->arming_state == ARMING_STATE_STANDBY_ERROR) {
+
+ ret = OK;
+ current_state->flag_fmu_armed = false;
+
+ }
+ break;
+ case ARMING_STATE_IN_AIR_RESTORE:
+
+ /* XXX implement */
+ break;
default:
break;
}