diff options
author | Don Gagne <don@thegagnes.com> | 2014-08-04 09:42:16 -0700 |
---|---|---|
committer | Don Gagne <don@thegagnes.com> | 2014-08-04 09:42:16 -0700 |
commit | cfe5c45e04f65f24110f222c3de02147146081e1 (patch) | |
tree | 84c3631b04b9bb4e50bf988fa299773a2e7156b4 /src/modules/commander/commander_tests | |
parent | 014fd5f47baad2f49292216eba851100aa543fef (diff) | |
download | px4-firmware-cfe5c45e04f65f24110f222c3de02147146081e1.tar.gz px4-firmware-cfe5c45e04f65f24110f222c3de02147146081e1.tar.bz2 px4-firmware-cfe5c45e04f65f24110f222c3de02147146081e1.zip |
Fix broken arming unit test
Also, update arming_state_transition calls to add new fRunPreArmChecks
flag.
Diffstat (limited to 'src/modules/commander/commander_tests')
-rw-r--r-- | src/modules/commander/commander_tests/state_machine_helper_test.cpp | 10 |
1 files changed, 5 insertions, 5 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 2e18c4284..08dda2fab 100644 --- a/src/modules/commander/commander_tests/state_machine_helper_test.cpp +++ b/src/modules/commander/commander_tests/state_machine_helper_test.cpp @@ -286,7 +286,7 @@ bool StateMachineHelperTest::armingStateTransitionTest(void) armed.ready_to_arm = test->current_state.ready_to_arm; // Attempt transition - transition_result_t result = arming_state_transition(&status, &safety, test->requested_state, &armed, 0 /* no mavlink_fd */); + transition_result_t result = arming_state_transition(&status, &safety, test->requested_state, &armed, false /* no pre-arm checks */, 0 /* no mavlink_fd */); // Validate result of transition ut_assert(test->assertMsg, test->expected_transition_result == result); @@ -335,12 +335,12 @@ bool StateMachineHelperTest::mainStateTransitionTest(void) MTT_ALL_NOT_VALID, MAIN_STATE_ACRO, MAIN_STATE_MANUAL, TRANSITION_CHANGED }, - { "transition: MANUAL to AUTO_MISSION - global position valid", - MTT_GLOBAL_POS_VALID, + { "transition: MANUAL to AUTO_MISSION - global position valid, home position valid", + MTT_GLOBAL_POS_VALID | MTT_HOME_POS_VALID, MAIN_STATE_MANUAL, MAIN_STATE_AUTO_MISSION, TRANSITION_CHANGED }, - { "transition: AUTO_MISSION to MANUAL - global position valid", - MTT_GLOBAL_POS_VALID, + { "transition: AUTO_MISSION to MANUAL - global position valid, home position valid", + MTT_GLOBAL_POS_VALID | MTT_HOME_POS_VALID, MAIN_STATE_AUTO_MISSION, MAIN_STATE_MANUAL, TRANSITION_CHANGED }, { "transition: MANUAL to AUTO_LOITER - global position valid", |