I've added a few explanatory comments and renamed the array "channel" to "servo_pos" as it actually depicts servo positions, hopefully avoiding the confusion with receiver output channels. No code changes.
Code: Select all
// Optionally, and only if you fully understand the array allocations, you can set any unused analogues here instead of // paralleling unused analogue inputs. Either method prevents floating inputs 'wandering' or following an adjacent pin. // Physical wiring is: A0=aileron stick pot, A1=elevator, A2=rudder, A3=throttle, A4=aux1, A5=aux2, and // A0 is your 'primary steering' control - on a rudder/elevator/throttle set, the rudder servo is plugged into the aileron channel. SOP. // So for example on a 3ch set, zero the rudder, aux1 & aux2 elements (servo_pos is primary steering) like this: // servo_pos=0; servo_pos=0; servo_pos=0 // example for a 3ch rudder-elevator-throttle set
No Bo, channel is your primary steering channel, in a 3ch set rudder is primary steering.
You would never disable the aileron channel unless you fly some weird mode (3?) with steering on the secondary stick. When you fit out a 3ch rudder-elevator-throttle model, its expected that you'd plug the rudder servo into the receiver aileron channel... thats how its always been
The single-channel emulation operates on array element "channel" as your primary steering channel, as do the V-tail and elevon mixes.
Its unfortunate that I used the word 'channel' as the name for the servo position array, as occasionally people confuse it with R/C channels and the order of channels output by the receiver.
So on a 3-channel set, you would zero channel, channel and channel, leaving channel, channel and channel active for rudder, elevator and throttle respectively.
No you dont Max, its either tie unused inputs OR code them out. The document is aimed at non-tech people who use my pre-programmed 7ch boards, or who are not adept at code changes, and they should tie unused inputs.
For those who can code, who fully understand the sketch and are blowing their own boards from it, zeroing unused channels is an alternative. Nothing has changed in this respect from the earlier code!
To be honest this urge for first-time-users to change a perfectly stable project before even trying it makes me nervous. If anyone is not absolutely 100% on how the code works I'd be much happier if they leave it as-is and parallel unused inputs exactly as per the document, many hundreds have been done this way, exactly as per the document, and it works!