From be8a43a4ccdf67b937a9a36afd8ad501bb170846 Mon Sep 17 00:00:00 2001 From: Jacob Moore Date: Tue, 26 Nov 2024 16:13:02 -0700 Subject: [PATCH] some updates to the unit tests --- test/command_manager_test.cpp | 1 + test/parameters_test.cpp | 2 +- test/state_machine_test.cpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/command_manager_test.cpp b/test/command_manager_test.cpp index c3de9f96..7ce644e7 100644 --- a/test/command_manager_test.cpp +++ b/test/command_manager_test.cpp @@ -55,6 +55,7 @@ class CommandManagerTest : public ::testing::Test for (int i = 0; i < 8; i++) { rc_values[i] = 1500; } rc_values[2] = 1000; + // TODO: Fix this unit test. There is no passthrough mixer rf.params_.set_param_int(PARAM_MIXER, Mixer::PASSTHROUGH); rf.params_.set_param_float(PARAM_FAILSAFE_THROTTLE, 0.0); max_roll = rf.params_.get_param_float(PARAM_RC_MAX_ROLL); diff --git a/test/parameters_test.cpp b/test/parameters_test.cpp index b54be57b..a0f4a4b2 100644 --- a/test/parameters_test.cpp +++ b/test/parameters_test.cpp @@ -66,7 +66,7 @@ TEST(Parameters, DefaultParameters) EXPECT_PARAM_EQ_FLOAT(PARAM_RC_OVERRIDE_DEVIATION, 0.1f); EXPECT_PARAM_EQ_INT(PARAM_RC_OVERRIDE_TAKE_MIN_THROTTLE, 1); EXPECT_PARAM_EQ_INT(PARAM_RC_ATTITUDE_MODE, 1); - EXPECT_PARAM_EQ_INT(PARAM_MIXER, Mixer::INVALID_MIXER); + EXPECT_PARAM_EQ_INT(PARAM_PRIMARY_MIXER, Mixer::INVALID_MIXER); EXPECT_PARAM_EQ_INT(PARAM_FIXED_WING, 0); EXPECT_PARAM_EQ_INT(PARAM_AILERON_REVERSE, 0); EXPECT_PARAM_EQ_INT(PARAM_ELEVATOR_REVERSE, 0); diff --git a/test/state_machine_test.cpp b/test/state_machine_test.cpp index 235f5f87..40272292 100644 --- a/test/state_machine_test.cpp +++ b/test/state_machine_test.cpp @@ -25,7 +25,7 @@ class StateMachineTest : public ::testing::Test rf.init(); rf.state_manager_.clear_error( rf.state_manager_.state().error_codes); // Clear All Errors to Start - rf.params_.set_param_int(PARAM_MIXER, 10); + rf.params_.set_param_int(PARAM_PRIMARY_MIXER, 10); rf.params_.set_param_int(PARAM_CALIBRATE_GYRO_ON_ARM, false); // default to turning this off rf.params_.set_param_float(PARAM_FAILSAFE_THROTTLE, 0.0f); @@ -515,4 +515,4 @@ TEST_F(StateMachineTest, ArmAfterCorrectFailsafe) EXPECT_EQ(rf.state_manager_.state().armed, true); EXPECT_EQ(rf.state_manager_.state().error_codes, 0); EXPECT_EQ(rf.state_manager_.state().error, false); -} \ No newline at end of file +}