Actuator_control channel zero for flaps not working

Hello everyone,

I am trying to modify the flaps switch into a three position switch. This is because I want to differentiate between normal flight mode, take-off and landing. Each mode has different flap positions, elevator trim increment and symmetric aileron deflection (this only happens during landing to make sure that the flaps stall earlier than the ailerons).
llo everyone,

I am trying to modify the flaps switch into a three position switch. This is because I want to differentiate between normal flight mode, take-off and landing. Each mode has different flap positions, elevator trim increment and symmetric aileron deflection (this only happens during landing to make sure that the flaps stall earlier than the ailerons).

Initialy I thought this would be really straightforward and the only thing I had to do was to change the Firmware/src/module/fw_att_control/ FixedwingAttitudeControl.cpp file. The changes in the code can be found in the attached figure.

The thing is I get the requested behaviour of the flaps when I look at the actuator_control_0 channel 4 in Qgroundcontrol (signal is between 0 and 1). However, the servos does not move at all. The mixing of the flaps is done similair to that of the Borematic Maja.

Anybody an idea why the signal of actuator_control_0 channel 4 is not actually mapped to the output port of the flaps?


here my actuator_control_0 channel 4 time output (I go to all three positions of interest)

So did some additional things. Basically I wanted to check that when I clone the px4 Firmware repository, build it and flash it on the Pixhawk that then still the flaps are working. But they dont.

So if I flash using a custom firmware file (which was build succesfully in Linux, after freshly cloning the Firmware repo of px4) the flaps do not work, but if I choose the standard stable option in Qgroundcontrol when flashing it does work.

Maybe I am doing something obvious wrong, but this seems very weird to me. Anyone who has the same problem? All the other functions seem to be working fine (aileron, rudder, elevator, throttle, even the RC feed through channels)

Tested on the Borematic Maja airframe with a Pixhawk 2.