diff --git a/ROMFS/px4fmu_common/mixers/quad_test.mix b/ROMFS/px4fmu_common/mixers/quad_test.mix new file mode 100644 index 0000000000..a4876bea21 --- /dev/null +++ b/ROMFS/px4fmu_common/mixers/quad_test.mix @@ -0,0 +1,25 @@ +Multirotor mixer for TEST +=========================== + +This file defines a single mixer for a quadrotor with a wide configuration. All controls are mixed 100%. + +R: 4w 10000 10000 10000 0 + +Gimbal / payload mixer for last four channels +----------------------------------------------------- + +M: 1 +O: 10000 10000 0 -10000 10000 +S: 0 4 10000 10000 0 -10000 10000 + +M: 1 +O: 10000 10000 0 -10000 10000 +S: 0 5 10000 10000 0 -10000 10000 + +M: 1 +O: 10000 10000 0 -10000 10000 +S: 0 6 10000 10000 0 -10000 10000 + +M: 1 +O: 10000 10000 0 -10000 10000 +S: 0 7 10000 10000 0 -10000 10000 diff --git a/src/systemcmds/tests/test_mixer.cpp b/src/systemcmds/tests/test_mixer.cpp index 1d330eb53e..893a65a1b9 100644 --- a/src/systemcmds/tests/test_mixer.cpp +++ b/src/systemcmds/tests/test_mixer.cpp @@ -402,7 +402,7 @@ int test_mixer(int argc, char *argv[]) filename = argv[2]; } else { - filename = "/etc/mixers/quad_w.main.mix"; + filename = "/etc/mixers/quad_test.mix"; } load_mixer_file(filename, &buf[0], sizeof(buf)); @@ -414,8 +414,8 @@ int test_mixer(int argc, char *argv[]) mixer_group.load_from_buf(&buf[0], mc_loaded); PX4_INFO("complete buffer load: loaded %u mixers", mixer_group.count()); - if (mixer_group.count() != 3) { - PX4_ERR("FAIL: Quad W mixer load failed"); + if (mixer_group.count() != 5) { + PX4_ERR("FAIL: Quad test mixer load failed"); return 1; } diff --git a/unittests/mixer_test.cpp b/unittests/mixer_test.cpp index 3753ac77cd..6b47034e28 100644 --- a/unittests/mixer_test.cpp +++ b/unittests/mixer_test.cpp @@ -7,6 +7,6 @@ TEST(MixerTest, Mixer) { - const char *args[] = {"empty", "../ROMFS/px4fmu_common/mixers/IO_pass.mix", "../ROMFS/px4fmu_common/mixers/sk450_deadcat.main.mix"}; + const char *args[] = {"empty", "../ROMFS/px4fmu_common/mixers/IO_pass.mix", "../ROMFS/px4fmu_common/mixers/quad_test.mix"}; ASSERT_EQ(test_mixer(3, (char **)args), 0) << "IO_pass.mix failed"; }