I recently received my Ardupilot mega, but I could not find instructions on how to get it working on airframes like Twinstar, which have separate servos for each aileron. One related blog post here in diydrones mentioned, that feature is being implemented (although I did not find an open issue about it) but I was too impatient to wait for proper fix.
Here's my ugly fix for this:
1. Disable aileron mixing from transmitter and make connections to ardupilot as you would do on 1-servo aileron case.
2. Connect 2nd aileron servo to ardupilot output 5
3. Open ardupilot sketch in arduino ide and open "Attitude" file
4. Insert these two lines to place marked in picture:
g.rc_5.radio_out = g.channel_roll.radio_max.get() + ( -1 * (g.channel_roll.radio_out - g.channel_roll.radio_min.get()));
APM_RC.OutputCh(CH_5, g.rc_5.radio_out); // send to Servos
5. Compile and upload
Remove "-1 *" part, if 2nd servo does not need to be reversed compared to 1st servo.
Note!
Since failsafe mux only operates on first four channels, on event of failure, 2nd aileron can't be moved.
I hope this feature will be implemented properly in the near future, but this should do at least for now and at least for me. Hope this helps others too!
Comments
Using Ailerons has been discussed at length by many people (including myself). Only one lead in and one lead out on the APM with the out lead having a Y-connector on it (£3). It easy, fast and no worries about code changes (and servos being locked in failsafe).
Would not expect this to be in development given the cheap and easy hardware method and the required change to the failsafe setup. Nice job on coding though.