I have had a good troll through the attitude.pde code (2.24) and see that support is there for putting a second aileron servo on channel 5 or 6, driven from channel 1.
I am basing the following discussion on the fact that only one aileron channel (ch-1) is being sent to the APM. This may not be in keeping with the way the code was written in that the code may require a left and right channel (Ch-1, Ch-6 or 6) to be sent to the APM to correctly handle dual ailerons. Please put me right on this if you have relevant info.
Anyway, if the ailerons are only controlled by one channel, then a problem came up that caught me out.
A second aileron (lets say ch-5) works fine in any of the auto modes, as it uses roll information to drive the second aileron channel. However when manual is selected the code just passes the channel 5 (or 6) radio IN info through to the servo output, and because in my case there is no servo input going into channel 5, you loose the second aileron. The following code fixes this. See Attitude.pde
/* SG this are original Lines
if (g.rc_5_funct == RC_5_FUNCT_AILERON) g.rc_5.radio_out = g.rc_5.radio_in;
if (g.rc_6_funct == RC_6_FUNCT_AILERON) g.rc_6.radio_out = g.rc_6.radio_in; */
/* Start of modified Code */
if (g.rc_5_funct == RC_5_FUNCT_AILERON)
g.rc_5.servo_out = g.channel_roll.servo_out; //forces servo_out_5 to be coupled to Roll_servo_out if RC_5 set to Aileron
g.rc_5.radio_out = g.rc_5.radio_in;
if (g.rc_6_funct == RC_6_FUNCT_AILERON)
g.rc_6.servo_out = g.channel_roll.servo_out; //forces servo_out_6 to be coupled to Roll_servo_out if RC_6 set to Aileron
g.rc_6.radio_out = g.rc_6.radio_in;
/* End of modified Code */
You have to pass the roll signal through the calc_pwm() class to get the channel inversion incorporated into the signal. I have not as yet looked at other places where xx_FUNCT_AILERON is used, such as trim storage, so other changes may also be required else where. But the above mods do work correctly for all modes using just one Aileron inpt channel.
As this is a discussion forum I look forward to having the above shot down in flames or otherwise.