-
Notifications
You must be signed in to change notification settings - Fork 2
Mav Reversing
You can do all your setup via MAVLink if you prefer. Soon, the Mission Planner will have a custom UI in which to do this, but for now you can configure your setup with MAVlink parameters, which you can find in either the Mission Planner of HK GCS configuration pages.
First, disable the hardware DIP switch by setting SWITCH_ENABLE to 0. (Click on "Write Params" to save the settings.)
Now you can set each channel. To reverse a channel, enter "-1" for that channel's RCx_REV parameter. Normal is "1".
http://ardupilot-mega.googlecode.com/svn/ArduPilotMegaImages/mavreversing.png
To select elevon mode or reverse elevon channels, use the ELEVON parameters:
http://ardupilot-mega.googlecode.com/svn/ArduPilotMegaImages/mavelevon.png
Once manual control is setup correctly with your RC transmitter, then there are eight combinations of the three reverse switches possible. Two of these combinations will produce the correct servo output in manual mode, however, only one will both produce the correct servo output in manual mode and map the transmitter inputs correctly to roll/pitch commands in the autopilot-controlled modes, such as Stabalize. It takes a little trial-and-error to find the right combination, but here's a tutorial:
- First, set it up in manual mode by setting up elevon mixing on your RC transmitter. It matters which elevon is plugged into which channel! For me on the Skyfun, the left wing ailerons should be plugged into Ch1 and the right wing is Ch2
- Now that it's working in manual, put your APM in flight mode, and connect via the Mission Planner. Go through the regular setup process.
- Now let's set it up via MAVLink. Go to the Configuration screen and look at the MAVLink parameters. Find the Switch_Enable parameter and set it to 0 (to disable the DIP switches and do all config via MAVLink), and write the params. (Refresh to make sure that was recorded). Now go to Elevon Mixing and turn it to 1. Write the params and refresh to make sure they were recorded
- Now put your toggle in stabilize mode and move the plane around to test. You'll probably have to reverse something. On the Skyfun, I had to reverse Elevon Ch1 (ELEVON_CH1_REV = 1). Just change one thing at a time!
- If ROLL is functioning properly but PITCH is reversed, or vice versa, try swapping the servo cable channels.
To setup reversal and mixing using the EEPROM you first need to disable the use of the dip switches. You do that by setting the option SWITCH_ENABLE to 0. If SWITCH_ENABLE is 1 (the default) then the dip switches will control your mixing and channel reversal options.
Next you need to choose if you want to use elevon mixing or not. If you have a 'normal' plane with separate ailerons and elevator then you should set ELEVON_MIXING to 0 (the default). If you have elevons you should set it to 1.
For non-elevon setups (ie. setups with ELEVON_MIXING set to 0), you have 3 parameters that control the servo reversals, one for each channel you can reverse.
The 3 parameters are:
RC1_REV | aileron reversal | set to -1 for reversal | defaults to 1 (meaning no reversal) |
RC2_REV | elevator reversal | set to -1 for reversal | defaults to 1 (meaning no reversal) |
RC4_REV | rudder reversal | set to -1 for reversal | defaults to 1 (meaning no reversal) |
For elevon based setups (where you have set ELEVON_MIXING to 1), you have 3 different EEPROM parameters to setup. They are:
ELEVON_REVERSE | reverse the sense of the elevon mixing | set to 1 to reverse, defaults to 0 |
ELEVON_CH1_REVERSE | reverse channel 1 elevon | set to 1 to reverse, defaults to 0 |
ELEVON_CH2_REVERSE | reverse channel 2 elevon | set to 1 to reverse, defaults to 0 |
Please make sure that you do careful ground testing after setting these parameters. Also remember that your RC transmitter must be set up to do elevon mixing, too!
-
Whenever you change your firmware your EEPROM settings will revert to the defaults if the new firmware has an incompatible EEPROM format. Please use the APM mission planner or your ground control station to save your settings, and carefully check them after any firmware change.
-
make sure you always do ground tests before every flight to ensure your channel mixing and reversals are all correct. Be careful to check that not only are your transmitter controls correct, but that the APM responds correctly to attitude changes in the plane when in stabilise mode.