I am using a Zero to read signals from a Spektrum receiver and drive quadcopter motors. Everything is working, but the throttle response is jerky. For example, if I leave the throttle at a set value on my radio (say 50%), the motor doesn't stay perfectly at half throttle, it lurches to different speeds.
This appears to be caused by reading PWM pulse that are too long (or short). I'm wondering if I am approaching the interrupt handling incorrectly, causing the pulse length to be calculated incorrectly.
Any thoughts/pointers would appreciated. My pwm reading code can be found here: