aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander/state_machine_helper.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-09-08 21:49:59 +0200
committerLorenz Meier <lm@inf.ethz.ch>2013-09-08 21:49:59 +0200
commit11e4fbc3745193a61f6f56619318dc1bc0b60307 (patch)
treec62437439c681c706a2473f92429091eb0eb29a9 /src/modules/commander/state_machine_helper.cpp
parent14828cfda5f4c81cb8366d5eee4eb1e1cab45370 (diff)
downloadpx4-firmware-11e4fbc3745193a61f6f56619318dc1bc0b60307.tar.gz
px4-firmware-11e4fbc3745193a61f6f56619318dc1bc0b60307.tar.bz2
px4-firmware-11e4fbc3745193a61f6f56619318dc1bc0b60307.zip
Added additional vector functions, fixed seatbelt for global estimators
Diffstat (limited to 'src/modules/commander/state_machine_helper.cpp')
-rw-r--r--src/modules/commander/state_machine_helper.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/commander/state_machine_helper.cpp b/src/modules/commander/state_machine_helper.cpp
index 3cef10185..316b06127 100644
--- a/src/modules/commander/state_machine_helper.cpp
+++ b/src/modules/commander/state_machine_helper.cpp
@@ -228,8 +228,9 @@ main_state_transition(struct vehicle_status_s *current_state, main_state_t new_m
case MAIN_STATE_SEATBELT:
- /* need altitude estimate */
- if (current_state->condition_local_altitude_valid) {
+ /* need at minimum altitude estimate */
+ if (current_state->condition_local_altitude_valid ||
+ current_state->condition_global_position_valid) {
ret = TRANSITION_CHANGED;
}
@@ -237,8 +238,9 @@ main_state_transition(struct vehicle_status_s *current_state, main_state_t new_m
case MAIN_STATE_EASY:
- /* need local position estimate */
- if (current_state->condition_local_position_valid) {
+ /* need at minimum local position estimate */
+ if (current_state->condition_local_position_valid ||
+ current_state->condition_global_position_valid) {
ret = TRANSITION_CHANGED;
}