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.
as color ids instead of duplicating the color data.
Later, this will allow configurable colors as the colors can be copied
to the master config and used from that without any ram penalty.
Each flag was previously a whole byte, now all of the flags only take up
4 bytes as they are represented by bit masks.
This is cleaner because the different kind of flags are now separated.
Additionally this changes the behaviour of arming slightly. When using
a switch to arm the aircraft will not arm unless the switch has been in
the off state once. This prevents arming if you power the aircraft with
a low throttle and the switch in the on position.
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.
Added documentation.
Added LED_STRIP feature, can only be enabled under certain circumstances
depending on target due to pin/timer mappings - see documentation.