Mixing code is too simple and too strict ..
It is just good for 2 servo controls ... like a wing, or a fun jet.
Then there is a hack for a quadcopter and another for a different one.
It should be something flexible and clean.
That maybe more "complicated" for some novice ... but could be supported by some fix data from gui.
The board has 6 input and 6 output ..
The 6 output could be everything .. the 6 inputs make sense to assign them a meaning
6 input can be:
Aileron
Rudder
Elevator
Motor
Mode (Manual-Stability-Navigation)
Flaps (maybe can be configurable between flaps, and a 3 state navigation jump (neutral - no action, max - jump to line X, min - jump to line Y), so the navigation can be controlled by a 3 position switch on the TX
About the 6 outputs:
I would like to see a total configuration:
ch_out_1 = A * Aileron + B * Rudder + C * Elevator + D * Motor + F * Flags
ch_out_2 = .....
etc
Aileron, Rudder Elevator , Flaps and Motor are either the manual input, or the auto-navigation calculated input ... or a mix of the two, in stable mode
Yes, it implies to configure a matrix of 5 x 6 value (with positive and negative numbers) ... but there could be made some template for Wings, Quad, etc ... a new template can add a new air model.
What do you think ?
On top ... I want a configurable center and max and low value for each output channel, like I have on my radio. Actually, once the GluonPilot is between the radio and the servos, it has to replicate a good computer radio like could be my old Futaba FX-18
When can you do it
?... else ... I think I will have to go on my way ... and spy your code
Tchuss
e_lm_70
ps: Just order a GPS-GSM alarm-tracking module ... for have a position feedback for my planed far away flights .. just 35€ shipped ... a nice insurance for my bird ...