Shaved about 150us each strip update.
This commit leaves in some timing trace code for the CC3D target, the
results of which can be seen in the debug variables for the sections
being timed.
A later commit will remove/disable the timing code.
having to reference min/maxThrottle.
Range was not being calculated correctly.
Throttle color now blends with the current color of the LED so that at
mid throttle any orientation color is still correct when mixing Throttle
and Flight Mode on an LED.
Fix tabs. Reduce nesting level.
With an LED strip length of 10, arrange the leds clockwise from 1 to 10
starting with led 1 at the north west (10:30hrs) with led 5 north east
(01:30hrs), led 6 south east and led 10 south west.
When armed or not, moving the roll stick to the left will make the leds
on the left flash, and same for right and also for pitch forwards and
backwards too.
Removed many magic numbers.
Deduplicated code.
Removed unnecessary local variable usage.
The LED Strip is initialised to WHITE briefly on power up so that it's
possible to visually check that all LEDs are functioning correctly -
white uses each individual RGB diode and draws maximum power.
Introduced an API to allow any code to change any or all LED colors
individually. This takes a little ram since an additional buffer is
needed - 3 bytes per LED, in addition to the DMA buffer.