PPM Sum Pin Mapping

Hey guys, I have APM 2.5, and I’m using a FrSky D8R-xp 8 channel RX with ppm sum enabled. I get the correct readings on all channels, but channel 6 changes with my flight mode switch instead of channel 5, so I can’t use my flight modes. I know typically people just attach the channel 5 wire to the channel 6 input, but I can’t do this with PPM sum enabled(only 1 signal wire attaching to APM2.5). I did this in the past(megapirate and old arducopter versions) by changing some settings in the arduino files, but I am having no luck finding any references to pin mapping in Arducopter3.0.1. Any help?

I got it. Just needed to do a little more digging. Open up radio.pde in the arducopter folder. Change the following two lines by swapping the number in the square brackets:
//g.rc_5.set_pwm(periods[4]); //original channel 5
//g.rc_6.set_pwm(periods[5]); //original channel 6

Here is a more complete section of the code I changed if anyone else wants to reference it. Now whenever I want to tune I just set my transmitter to use channel 5, other than that everything works the same.

#define FAILSAFE_RADIO_TIMEOUT_MS 2000 // 2 seconds
static void read_radio()
static uint32_t last_update = 0;
if (hal.rcin->valid_channels() > 0) {
last_update = millis();
ap_system.new_radio_frame = true;
uint16_t periods[8];


//g.rc_5.set_pwm(periods[4]); //original channel 5
//g.rc_6.set_pwm(periods[5]); //original channel 6
g.rc_5.set_pwm(periods[5]); //new channel 5
g.rc_6.set_pwm(periods[4]); // new channel 6