fix(gx12): customisable switch startup/shutdown led animation (#7120)
This commit is contained in:
@@ -33,6 +33,8 @@ const unsigned char bmp_sleep[] = {
|
|||||||
|
|
||||||
#if defined(RADIO_FAMILY_T20)
|
#if defined(RADIO_FAMILY_T20)
|
||||||
constexpr uint8_t steps = NUM_FUNCTIONS_SWITCHES/2;
|
constexpr uint8_t steps = NUM_FUNCTIONS_SWITCHES/2;
|
||||||
|
#elif defined(RADIO_GX12)
|
||||||
|
constexpr uint8_t steps = NUM_FUNCTIONS_SWITCHES - 2; //Exclude SA and SD
|
||||||
#elif defined(FUNCTION_SWITCHES)
|
#elif defined(FUNCTION_SWITCHES)
|
||||||
constexpr uint8_t steps = NUM_FUNCTIONS_SWITCHES;
|
constexpr uint8_t steps = NUM_FUNCTIONS_SWITCHES;
|
||||||
#endif
|
#endif
|
||||||
@@ -95,6 +97,13 @@ void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration,
|
|||||||
steps);
|
steps);
|
||||||
|
|
||||||
for (uint8_t j = 0; j < steps; j++) {
|
for (uint8_t j = 0; j < steps; j++) {
|
||||||
|
#if defined(FUNCTION_SWITCHES_RGB_LEDS)
|
||||||
|
fsLedRGB(j, 0);
|
||||||
|
if (steps - index2 > j) {
|
||||||
|
fsLedRGB(j, 0xFFFFFF);
|
||||||
|
}
|
||||||
|
rgbLedColorApply();
|
||||||
|
#else
|
||||||
setFSLedOFF(j);
|
setFSLedOFF(j);
|
||||||
#if defined(RADIO_FAMILY_T20)
|
#if defined(RADIO_FAMILY_T20)
|
||||||
setFSLedOFF(j + steps);
|
setFSLedOFF(j + steps);
|
||||||
@@ -105,6 +114,7 @@ void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration,
|
|||||||
setFSLedON(j + steps);
|
setFSLedON(j + steps);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user