Program tips > Mixer Bug

by Mike Shellim Dec 2003

I came across this bug when setting up my my Acacia F3F sailplane with non-default flap mixing. The default setup is for the flap to be operated by a slider, with zero camber in the centre of travel, with +ve and -ve camber either side. I wanted to operate the flap lever in 'single-sided' mode with, with zero camber at one end, increasing to full positive camber at the other (I did not require negative camber).

The bug is not a show stopper, but I include it here because (a) it exists and (b) you could conceivably come across it and be confused, as I was.

Technical Description

A mixer input of type "Single Sided Linear with Offset" can interact unexpectedly with other mixer inputs.


The problem was detected in v 1.09 and was still present in v. 1.24.


By default, the aileron+ and flap+ mixers allow positive and negative camber to be selected by the flap control lever. However, I only use positive camber on the Acacia, so I changed the Flap curves from "Assymetrical" to "Single Sided with Curve". This would provide zero camber at one end point of the lever, and full +ve camber at the other - just what I wanted.

The Problem

For the first half of the lever travel, the flap responded as expected. However between half- and full lever travel, the camber suddenly increased beyond the expected value. Hmmm. Odd, but I got round this by adjusting the second end point of the flap input.

Then another problem: if I adjusted 'Offset' for the Spoiler input, the amount of camber due to the flap input would also change, even though Spoiler and Flap are independent inputs. This indicated an interaction between the Flap and Spoiler inputs - not good news!


Investigation using my Servosim tool confirmed an interaction between mixer curves "Single Sided Linear with Offset" and "Single Sided with Curve". This interaction accounts for both of the symptoms described above and seems to be due to a simple error in the firmware.

A Simple Demo

Hers's a simple demo which will make a servo move even when the controls affecting that servo are supposedly disabled:

Step 1. Assign Controls

Flap = slider E, idle is fully forward
Spoiler = LH stick, idle is fully forward

Each control should be in the idle position when you confirm the assignment.

Step 2. Define Mixer

Define a mixer - call it "Testmix" - with two inputs:

Step 3. Assign Servo

Assign a servo to Testmix.

4. Set Testmix parameters

Set these values for Testmix in the dynamic mixers menu.

Spoiler: Offset= -40     Travel= 20
Flap:    Pt1   =  OFF     Pt2   = OFF

Note that both Pt values are set to OFF, so the Flap input should have no effect. However, as you move the flap control from the centre position to the fully back position, the servo moves!

Predicted and Actual Servo Positions

Here's an analysis of what's meant to happen and what does in fact occur:

Spoiler Flap     Predicted       Actual
FWD     FWD      -40 (-40+0)    -40 ok
FWD     CENTER   -40 (-40+0)    -40 ok
FWD     BACK     -40 (-40+0)      0 WRONG
BACK    FWD       20 (20+0)      20 ok
BACK    CENTER    20 (20+0)      20 ok
BACK    BACK      20 (20+0)      60 WRONG

The predicted positions were calculated by applying the curves as described in the instructions, and adding the mixer inputs together.

The actuals were obtained using ServoSim to check the outputs of the channels.

The error occurs as the Flap is moved between Pt 1 and Pt 2 - the actual and predicted values differ by the value of Offset.

I suspect the programmer omitted to take Offset into account when calculating the second servo end point.


The simplest workaround is not to use the single-sided curve!

Another workaround is to alter Pt 2 in the Flap input. So in the case above, you'd set Pt 2 to 30-40 = -10. In practice you would do this by eye anyway. However, each time you alter the spoiler offset, you'd still have to remember to readjust the flap travel.


Further investigation showed that a similar problem occurs using the "Single Sided Linear with Offset" in conjunction with "Single sided linear with dead zone". Since this is an unlikely combination of inputs, I have not looked into it further.