Does anyone know any way of mapping the servo mid and end points that APM uses?
I have modified elevons on my Skyfun which, unfortunately, have a limited down travel. If the elevon servo forces it beyond the limit there is a risk of bending the pushrod or breaking the clevis.
What I currently have done is adjust the pushrod lengths so that at max stick and max trim (or min and min) the servo doesn't force the elevon against the stop. This is 965us and 2069us for each side respectively, however this solution puts the elevon neutral position way too high (pitched up) for anything near level flight
What I would like to do is map the servo outputs in two linear segments from min/down to neutral and from neutral to max/up. I can't see anywhere this is possible in APM at the moment, but it would be a nice feature
A quick fix would be just to add a neutral trim offset. Again, I haven't yet figured out how this can be done in APM, Anyone with any clues...?
What do you mean with mapping? Usually mapping means associating each of the elements in one set with one in another..
You can see the min. and max. limits of each RC channel in the "full parameter list" in MP.
Be aware that if you use old style elevons in AP (where you have your transmitter set up for elevons too) you have to minimize and maximize the channels in RC calibration by moving the sticks to the corners that give you the min and max pitch and roll channel values. Just moving the sticks left right up down is not enough.
Elevons are not the most elegantly implemented feature in APM.
By mapping, I mean two linear transfer functions:
Nominal Servo Ouput: -> Actual Servo Output
(min - mid - max)
Ch1: 1000 - 1500 - 2000us -> 965 - 1200 - 1995
Ch2: 1000 - 1500 - 2000us -> 2070 - 1840 - 965
The RCx_MIN, RCx_MAX and RCx_DZ etc parameters are on the input side of the APM. I would like to see something similar for the servo outputs, in effect decoupling the transmitter entirely from the servo response.
I know this will have some implications from failsafe and passthrough modes, but I am already relying on the APM with ELEVON_OUTPUT-based mixing.
The last time I looked at the elevon code (there are 2 different flavors: Input and output elevon-mixed, and output-only. It looks like you are using output-only, right?), there was no support for 2 different output gain factors (1 for up and another for down). Just one.
You can git clone or download the source code and see. Just search for "elevon" in all files and you will find where the transforms in and out are.
I wound up recompiling 2.74 with a hard-coded offset on the output of each elevon PWM value. This gets it close enough for the trim function to take over.
The elevons saturate/clip at their lower (down) limit, but this is unlikely to be an issue in flight. since I don't think they'll get even close to this position.
What is the way to do it in the new setup?