diydrones/ardupilot — pull request #520 by Kwarf (2013-08-28 21:41:48+00:00)
Title: ArduPPM: Added Spektrum satellite support

This adds the ability to directly attach a Spektrum satellite to the APM.

Since there's no free timer available I used an overflow interrupt on the timer that is used for the PPM encoder to time the sampling of the data bits.

This is only tested on the APM2.5 (ATmega32U2). I have tested with 2 different satellites bound in 2 different modes, 7 channels at 22ms frame interval and 9 channels at 11ms frame interval. See http://blog.kwarf.com/2013/08/a-look-at-the-spektrum-satellite-protocol/ for more info about the protocol.

The jumper should be connected between channel 3 and 4 to enable this mode.

Known issues
- When the USB cable is connected it has a hard time to keep up with the sampling, so it will cause some packets to be dropped, it may also read the channel position incorrectly causing a servo glitch. I don't really see this as a problem since you don't use the USB in flight, I have measured without it attached and it did not drop a single frame in 5 minutes.
- 11 bit frames are not supported, I only have a DM8 module so I can't configure it to output 11 bits, and I didn't feel confident implementing something I cannot test.

This will obviously need much testing before being merged, but I know that this feature has been requested on the forums multiple times.