state. Mutually exclusive with leds that show MODE.
Use blue to indicate armed, green for disarmed.
Leds not configured for ARM_STATE or MODE will be off by default.
The example combines corner LEDs with ARM_STATE and INDICATOR. This
results in the corner leds showing arm state and then being overridden
with an indicator color as needed.
Cleaned up the battery warning checking as it was being calculated twice
instead of just once per battery warning state cycle.
Updated the code so that modes are shown when disarmed. Any led's
without the MODE flag will then show the armed state. In the config in
this commit that results in the corner LEDs being GREEN when disarmed
and OFF when armed.
Output files were being left in the working directory.
Build needs to be tested on cygwin, if it fails find a different
solution or revert this commit.
If a given feature or mode is off the next task is not processed in the
current loop but will be processed during the next loop iteration for
simplification, this allowed the cleanup of return values in other code.
Added documentation.
Added LED_STRIP feature, can only be enabled under certain circumstances
depending on target due to pin/timer mappings - see documentation.
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.
When armed the first half of the strip is green the second half is red.
When disarmed the strip is various shades of red.
When the battery is low the strip will flash.