Conversation
|
That looks really nice. I suppose you didn't add it to shutdown animation also because of the strobing (because FS led state is still being managed by evalFunctionSwitches)? If you're interested in add that also... this should work... feel free to add or improve ;) diff --git a/radio/src/gui/128x64/startup_shutdown.cpp b/radio/src/gui/128x64/startup_shutdown.cpp
index 6afb2b490..0e87d4301 100644
--- a/radio/src/gui/128x64/startup_shutdown.cpp
+++ b/radio/src/gui/128x64/startup_shutdown.cpp
@@ -67,6 +67,16 @@ void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char
lcdRefreshWait();
lcdClear();
+#if defined(FUNCTION_SWITCHES)
+ uint8_t index2 = limit<uint8_t>(0, duration / (totalDuration / (NUM_FUNCTIONS_SWITCHES+1)), NUM_FUNCTIONS_SWITCHES);
+
+ for (uint8_t j = 0; j < NUM_FUNCTIONS_SWITCHES; j++) {
+ fsLedOff(j);
+ if (NUM_FUNCTIONS_SWITCHES - index2 > j)
+ fsLedOn(j);
+ }
+ #endif
+
for (uint8_t i = 0; i < 4; i++) {
if (4 - index > i) {
lcdDrawFilledRect(LCD_W / 2 - 18 + 10 * i, LCD_H / 2 - 3, 6, 6, SOLID, 0);
diff --git a/radio/src/switches.cpp b/radio/src/switches.cpp
index 736938b8a..6c2f6c0d1 100644
--- a/radio/src/switches.cpp
+++ b/radio/src/switches.cpp
@@ -145,10 +145,12 @@ void evalFunctionSwitches()
storageDirty(EE_MODEL);
}
+if (!pwrPressed()) {
if (getFSLogicalState(i))
fsLedOn(i);
else
fsLedOff(i);
+}
}
}
#endif
|
Yup, absolutely. I tried some changes for shutdown but too much flickering 😄, it needs more tinkering. |
|
@pfeerick Man, I spent a few hours searching how to change that evalFunctionSwitches, I really suck 😙 |
|
Nah, just means I've been poking around in the code too much. For future reference, I was in luck... I just searched for usage of fsOn /fsOff and that was indeed it. |
* TPro - Fancy led startup seq * Cleanup * fix define for function switches * added shutdown sequence @pfeerick * Formatting Co-authored-by: Batam <batam@macbook-pro.home> Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
Summary of changes:
Just a fancy startup Leds sequence, using function switches led.
Only for TPro.