Skip to content
Snippets Groups Projects
Commit d0dbddea authored by Lorenz Meier's avatar Lorenz Meier Committed by Daniel Agar
Browse files

Extend mixer test case with complex mixer

parent 51a89b74
No related branches found
No related tags found
No related merge requests found
M: 1
O: 10000 10000 0 -10000 10000
S: 0 0 10000 10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
S: 0 3 10000 10000 0 -10000 10000
S: 0 4 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 1 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 2 10000 10000 0 -10000 10000
M: 1
O: 10000 10000 0 -10000 10000
S: 0 3 10000 10000 0 -10000 10000
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
......@@ -99,6 +99,7 @@ private:
bool loadVTOL1Test();
bool loadVTOL2Test();
bool loadQuadTest();
bool loadComplexTest();
bool load_mixer(const char *filename, unsigned expected_count, bool verbose = false);
bool load_mixer(const char *buf, unsigned loaded, unsigned expected_count, const unsigned chunk_size, bool verbose);
......@@ -116,6 +117,7 @@ bool MixerTest::run_tests(void)
ut_run_test(loadQuadTest);
ut_run_test(loadVTOL1Test);
ut_run_test(loadVTOL2Test);
ut_run_test(loadComplexTest);
ut_run_test(mixerTest);
return (_tests_failed == 0);
......@@ -123,6 +125,31 @@ bool MixerTest::run_tests(void)
ut_declare_test_c(test_mixer, MixerTest)
bool MixerTest::loadIOPass()
{
return load_mixer(MIXER_PATH(IO_pass.mix), 8);
}
bool MixerTest::loadQuadTest()
{
return load_mixer(MIXER_PATH(quad_test.mix), 5);
}
bool MixerTest::loadVTOL1Test()
{
return load_mixer(MIXER_PATH(vtol1_test.mix), 4);
}
bool MixerTest::loadVTOL2Test()
{
return load_mixer(MIXER_PATH(vtol2_test.mix), 6);
}
bool MixerTest::loadComplexTest()
{
return load_mixer(MIXER_PATH(complex_test.mix), 8);
}
bool MixerTest::load_mixer(const char *filename, unsigned expected_count, bool verbose)
{
char buf[2048];
......@@ -232,26 +259,6 @@ bool MixerTest::load_mixer(const char *buf, unsigned loaded, unsigned expected_c
return true;
}
bool MixerTest::loadIOPass()
{
return load_mixer(MIXER_PATH(IO_pass.mix), 8);
}
bool MixerTest::loadQuadTest()
{
return load_mixer(MIXER_PATH(quad_test.mix), 5);
}
bool MixerTest::loadVTOL1Test()
{
return load_mixer(MIXER_PATH(vtol1_test.mix), 4);
}
bool MixerTest::loadVTOL2Test()
{
return load_mixer(MIXER_PATH(vtol2_test.mix), 6);
}
bool MixerTest::mixerTest()
{
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment