JoyStick Button and Do_Set_Servo

My APM is configured with flaps on servo channel 5, pan/tilt on 6/7 and mode control on 8. The flaps are manually selected with a switch when using the traditional r/c transmitter. I am trying to set up a set of joystick buttons to select “flaps up”, “approach flaps” and “landing flaps”.

There is nothing set on the joystick CH 5 entry, it is left at “NONE”.

I am using four button ids - 4,5,6 and 7. Each one has a Do_Set_Servo command that sets channel 5’s PWM to an appropriate value for the three flap positions. (Two approach settings are duplicated.)

When a button is pressed, the flap servos make a momentary movement and then go back to PWM 1000, “flaps up”.

It seems to me that the CH 5 “NONE” may still be sending commands to position that servo despite the “NONE” selection. Can you check on this ? Thanks.

double check what your rc5_function is set to

RC5_Function = 1; “RCPassThru”

Here is a tlog graph of channel 5 showing its reaction to holding the “landing flaps” button down. You can see that the PWM value drops momentarily and then reverts to the idle value.

I believe I have MP and APM correctly configured. If this is a bug in MP and I should post it as such to the Developer’s forum, just let me know and I’ll take the issue there.

Thanks.

After looking at the graph above, it appears to show the PWM value actually dropping momentarily. The Do_Set_Servo command is configured to set channel 5 to 1500 us, so it should have pulsed upward?

Do you have any theory why this is acting this way?

Thanks.