PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Public Member Functions | |
virtual bool | run_tests () |
Override to run your unit tests. More... | |
MixerTest ()=default | |
Public Member Functions inherited from UnitTest | |
UnitTest ()=default | |
virtual | ~UnitTest ()=default |
void | print_results () |
Prints results from running of unit tests. More... | |
Private Member Functions | |
bool | mixerTest () |
bool | loadIOPass () |
bool | loadVTOL1Test () |
bool | loadVTOL2Test () |
bool | loadQuadTest () |
bool | loadComplexTest () |
bool | loadAllTest () |
bool | load_mixer (const char *filename, unsigned expected_count, bool verbose=false) |
bool | load_mixer (const char *filename, const char *buf, unsigned loaded, unsigned expected_count, const unsigned chunk_size, bool verbose) |
Private Attributes | |
MixerGroup | mixer_group |
Additional Inherited Members | |
Protected Member Functions inherited from UnitTest | |
virtual void | _init (void) |
Run before each unit test. Override to provide custom behavior. More... | |
virtual void | _cleanup (void) |
Run after each unit test. Override to provide custom behavior. More... | |
void | _print_assert (const char *msg, const char *test, const char *file, int line) |
void | _print_compare (const char *msg, const char *v1_text, int v1, const char *v2_text, int v2, const char *file, int line) |
Protected Attributes inherited from UnitTest | |
int | _tests_run {0} |
The number of individual unit tests run. More... | |
int | _tests_failed {0} |
The number of unit tests which failed. More... | |
int | _tests_passed {0} |
The number of unit tests which passed. More... | |
int | _assertions {0} |
Total number of assertions tested by all unit tests. More... | |
Definition at line 94 of file test_mixer.cpp.
|
default |
|
private |
Definition at line 224 of file test_mixer.cpp.
References load_mixer_file(), and PX4IO_MAX_TRANSFER_LEN.
Referenced by loadAllTest(), loadComplexTest(), loadQuadTest(), loadVTOL1Test(), loadVTOL2Test(), mixerTest(), and ut_declare_test_c().
|
private |
Definition at line 248 of file test_mixer.cpp.
References MixerGroup::count(), MixerGroup::load_from_buf(), mixer_callback(), mixer_group, mixer_text, mixer_text_length, PX4IO_MAX_MIXER_LENGTH, MixerGroup::reset(), and ut_compare.
|
private |
Definition at line 155 of file test_mixer.cpp.
References load_mixer(), MIXER_ONBOARD_PATH, and PATH_MAX.
Referenced by run_tests().
|
private |
Definition at line 150 of file test_mixer.cpp.
References load_mixer(), and MIXER_PATH.
Referenced by run_tests().
|
private |
|
private |
Definition at line 135 of file test_mixer.cpp.
References load_mixer(), and MIXER_PATH.
Referenced by run_tests().
|
private |
Definition at line 140 of file test_mixer.cpp.
References load_mixer(), and MIXER_PATH.
Referenced by run_tests().
|
private |
Definition at line 145 of file test_mixer.cpp.
References load_mixer(), and MIXER_PATH.
Referenced by run_tests().
|
private |
Definition at line 341 of file test_mixer.cpp.
References matrix::abs(), actuator_controls, f(), hrt_absolute_time(), hrt_abstime, hrt_elapsed_time(), INIT_TIME_US, load_mixer(), MixerGroup::mix(), MIXER_DIFFERENCE_THRESHOLD, mixer_group, MIXER_PATH, output_limit_calc(), output_limit_init(), output_max, PWM_DEFAULT_MAX, PWM_DEFAULT_MIN, PWM_LOWEST_MIN, PWM_MOTOR_OFF, r_page_servo_control_max, r_page_servo_control_min, r_page_servo_disarmed, r_page_servos, RAMP_TIME_US, should_arm, and should_prearm.
Referenced by run_tests().
|
virtual |
Override to run your unit tests.
Unit tests should be called using ut_run_test macro.
Implements UnitTest.
Definition at line 115 of file test_mixer.cpp.
References UnitTest::_tests_failed, loadAllTest(), loadComplexTest(), loadIOPass(), loadQuadTest(), loadVTOL1Test(), loadVTOL2Test(), mixerTest(), and ut_run_test.
|
private |
Definition at line 112 of file test_mixer.cpp.
Referenced by load_mixer(), and mixerTest().