From 1913b970d7110834c5f4ecb5b5ee02b2c6d6e32f Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Mon, 17 Apr 2017 12:50:04 -0400 Subject: [PATCH] main state auto mission don't require valid mission --- .../commander/commander_tests/state_machine_helper_test.cpp | 2 +- src/modules/commander/state_machine_helper.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/commander/commander_tests/state_machine_helper_test.cpp b/src/modules/commander/commander_tests/state_machine_helper_test.cpp index c74dd96b54..f69842c517 100644 --- a/src/modules/commander/commander_tests/state_machine_helper_test.cpp +++ b/src/modules/commander/commander_tests/state_machine_helper_test.cpp @@ -298,7 +298,7 @@ bool StateMachineHelperTest::armingStateTransitionTest() &status_flags, 5.0f, /* avionics rail voltage */ check_gps, - true, /* can arm without valid mission */ + false, /* valid mission not required*/ 2e6 /* 2 seconds after boot, everything should be checked */ ); diff --git a/src/modules/commander/state_machine_helper.cpp b/src/modules/commander/state_machine_helper.cpp index 40ab033899..a34fa28d53 100644 --- a/src/modules/commander/state_machine_helper.cpp +++ b/src/modules/commander/state_machine_helper.cpp @@ -415,9 +415,9 @@ main_state_transition(struct vehicle_status_s *status, main_state_t new_main_sta case commander_state_s::MAIN_STATE_AUTO_MISSION: /* need global position, home position, and a valid mission */ + // TODO: require mission? condition_auto_mission_available if (status_flags->condition_global_position_valid && - status_flags->condition_home_position_valid && - status_flags->condition_auto_mission_available) { + status_flags->condition_home_position_valid) { ret = TRANSITION_CHANGED; }