Add LOGO+ scrolling SetSav mode

This commit is contained in:
Armel FAUVEAU committed 2026-05-13 03:21:43 +02:00
1 parent 8ecf976067
commit 546cd35681
3 files changed
+32

No files matched your search

+30
View File
@@ -210,6 +210,29 @@ static void ScreenSaverRenderMatrix(bool reset)
ST7565_BlitFullScreen();
}
static void ScreenSaverScrollLogoLine(uint8_t *line)
{
const uint8_t first = line[0];
memmove(line, line + 1, LCD_WIDTH - 1);
line[LCD_WIDTH - 1] = first;
}
static void ScreenSaverRenderLogoPlus(bool reset)
{
if (reset) {
UI_DisplayLogo();
return;
}
ScreenSaverScrollLogoLine(gStatusLine);
for (uint8_t line = 0; line < FRAME_LINES; line++)
ScreenSaverScrollLogoLine(gFrameBuffer[line]);
ST7565_BlitStatusLine();
ST7565_BlitFullScreen();
}
static bool ScreenSaverCanDisplay(void)
{
if (gSetting_set_sav == SET_SAV_OFF ||
@@ -241,6 +264,8 @@ static void ScreenSaverTryDisplay(void)
if (gSetting_set_sav == SET_SAV_LOGO)
UI_DisplayLogo();
else if (gSetting_set_sav == SET_SAV_LOGO_PLUS)
ScreenSaverRenderLogoPlus(true);
else if (gSetting_set_sav == SET_SAV_MATRIX)
ScreenSaverRenderMatrix(true);
@@ -1599,6 +1624,11 @@ void APP_TimeSlice10ms(void)
gScreenSaverTick = 0;
ScreenSaverRenderMatrix(false);
}
} else if (gSetting_set_sav == SET_SAV_LOGO_PLUS) {
if (++gScreenSaverTick >= 16u) {
gScreenSaverTick = 0;
ScreenSaverRenderLogoPlus(false);
}
}
}
#endif
+1
View File
@@ -185,6 +185,7 @@ extern enum BacklightOnRxTx_t gSetting_backlight_on_tx_rx;
enum SET_SAV_t {
SET_SAV_OFF,
SET_SAV_LOGO,
SET_SAV_LOGO_PLUS,
SET_SAV_MATRIX,
SET_SAV_LEN
};
+1
View File
@@ -306,6 +306,7 @@ const char* const gSubMenu_SET_SAV[] =
{
"OFF",
"LOGO",
"LOGO+",
"MATRIX"
};
#endif