Where in the source code is what assigns the rc in to the flight mode? I can see in the comments of the mode what pwm is set to that channel but cant find where the actual pwm value is encoded.
// @Param: FLTMODE2
// @DisplayName: Flight Mode 2
// @Description: Flight mode when Channel 5 pwm is >1230, <= 1360
// @Values: 0:Stabilize,1:Acro,2:AltHold,3:Auto,4:Guided,5:Loiter,6:RTL,7:Circle,9:Land,11:Drift,13:Sport,16:PosHold,17:Brake
// @User: Standard
GSCALAR(flight_mode2, "FLTMODE2", FLIGHT_MODE_2),
That range is separate for the 6 set-able flight modes
What I need is where that 1230 to 1360 range actually is so that I can divide it further for a different purpose. The flight mode is not going to be changed at all I just need an extra 3 position switch on the same channel.
I will set my transmitter to be centered within the normal range with my extra switch adjusting by +-30 usec pwm for my other purpose.
This is to effectively extend the number of channels that a pixhawk is capable of using.