mixer multirotor: add unit-tests

To run:
cd src/lib/mixer
make tests

This will validate the C++ implementation by taking the python
implementation as ground-truth. It runs through various actuator control
command values for all airmode variations and several mixer types.

The python script also allows to prototype new mixer algorithms.

It is not integrated into the existing build system, because it's easier
to use that way, with less dependencies, and faster testing workflow.
It could however be a bit more integrated.

Reference: https://github.com/Auterion/Flight_Control_Prototyping_Scripts/tree/master/control_allocation
This commit is contained in:
Beat Küng
2018-12-01 08:54:12 +01:00
parent c659d2bcc2
commit cf66656258
8 changed files with 618 additions and 1 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ static int mixer_callback(uintptr_t handle,
uint8_t control_index,
float &control);
const unsigned output_max = 8;
static const unsigned output_max = 8;
static float actuator_controls[output_max];
static bool should_prearm = false;