1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Improve speed of LED STRIP code.

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.
This commit is contained in:
Dominic Clifton 2014-09-20 01:00:13 +01:00
parent 36dac872b8
commit e847a6347d
9 changed files with 189 additions and 15 deletions

View file

@ -725,8 +725,11 @@ void updateLedStrip(void)
static uint8_t warningState = 0;
static uint8_t warningFlags;
TIME_SECTION_BEGIN(3);
// LAYER 1
TIME_SECTION_BEGIN(0);
applyLedModeLayer();
applyLedThrottleLayer();
@ -781,7 +784,14 @@ void updateLedStrip(void)
#ifdef USE_LED_ANIMATION
applyLedAnimationLayer();
#endif
TIME_SECTION_END(0);
TIME_SECTION_BEGIN(2);
ws2811UpdateStrip();
TIME_SECTION_END(2);
TIME_SECTION_END(3);
}
bool parseColor(uint8_t index, char *colorConfig)