spoiler 1 and 2 are connected to 2 auxiliary channels, functions are
set to 16 on left wing and 17 om right wing respectively. Worked in
FBW + mode (auto etc.). No manual mode supported yet (need more
channels in my case).
remove unused enable_out_ch() and enable k_manual channels. This
ensures k_manual channels used for bottle drop are initialised
correctly to trim output
it is perfectly valid to configure two RC channels with the same
function, especially when that function is manual output (ie. copy
input to output)
This removes the g_rc_function[] indirection array
This has the added benefit of saving 60 bytes and simplifying Mission Planner gui.
Moved some code from RC_Channel_aux to AP_Mount class
The servos get written by the update_mount_position() function, this simplifies main()
PS: The beauty of using libraries: I did not have to touch a single line of ArduPlane's code!
changed parameter names of "update_aux_servo_function" to make it more clear that any 4 servos can be passed in (not just servos 5~8).
Also allowed NULL servos to be passed in as parameters because we only need 3 in ArduCopter.
It is fully configurable with the mission planner, there is no need to change
the source code to adapt to your setup.
It needs more testing, but the SIL is not working for me.
Fix an issue with initialization of channels that on-line changed their function.
For the curious people that the code size overhead of having any aux channel do any function (with this code) is 44 bytes.
To see wich code I'm talking about, do a git diff 05057ac2d455..this_commit (replace this commit with the commit hash of this commit)
This simplifies code sharing between ArduCopter and Arduplane at the expense of 48bytes.
Moved CH_x defines out of the defines.h file and into the library where they belong