Create function to zero gFrameBuffer

Size: 60464 -> 60420
This commit is contained in:
Juan Antonio 2023-12-25 01:24:47 +01:00 committed by egzumer
parent f8ef687026
commit 78a45d9bbd
9 changed files with 17 additions and 11 deletions

View File

@ -1075,7 +1075,7 @@ static void RenderStill() {
}
static void Render() {
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
UI_DisplayClear();
switch (currentState) {
case SPECTRUM:

View File

@ -32,7 +32,7 @@ void UI_DisplayFM(void)
{
char String[16] = {0};
char *pPrintStr = String;
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
UI_DisplayClear();
UI_PrintString("FM", 0, 127, 0, 12);

View File

@ -253,3 +253,8 @@ void UI_DisplayPopup(const char *string)
UI_PrintString(string, 9, 118, 2, 8);
UI_PrintStringSmall("Press EXIT", 9, 118, 6);
}
void UI_DisplayClear()
{
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
}

View File

@ -36,4 +36,6 @@ void UI_DrawPixelBuffer(uint8_t (*buffer)[128], uint8_t x, uint8_t y, bool black
void UI_DrawLineBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black);
void UI_DrawRectangleBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black);
void UI_DisplayClear();
#endif

View File

@ -35,7 +35,7 @@ static void Render(void)
char String[7];
memset(gStatusLine, 0, sizeof(gStatusLine));
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
UI_DisplayClear();
UI_PrintString("LOCK", 0, 127, 1, 10);
for (i = 0; i < 6; i++)

View File

@ -309,7 +309,7 @@ void UI_DisplayMain(void)
center_line = CENTER_LINE_NONE;
// clear the screen
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
UI_DisplayClear();
if(gLowBattery && !gLowBatteryConfirmed) {
UI_DisplayPopup("LOW BATTERY");

View File

@ -404,7 +404,7 @@ void UI_DisplayMenu(void)
#endif
// clear the screen buffer
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
UI_DisplayClear();
#if 0
// original menu layout

View File

@ -31,7 +31,7 @@ void UI_DisplayScanner(void)
bool bCentered;
uint8_t Start;
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
UI_DisplayClear();
if (gScanSingleFrequency || (gScanCssState != SCAN_CSS_STATE_OFF && gScanCssState != SCAN_CSS_STATE_FAILED)) {
sprintf(String, "FREQ:%u.%05u", gScanFrequency / 100000, gScanFrequency % 100000);

View File

@ -30,7 +30,7 @@
void UI_DisplayReleaseKeys(void)
{
memset(gStatusLine, 0, sizeof(gStatusLine));
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
UI_DisplayClear();
UI_PrintString("RELEASE", 0, 127, 1, 10);
UI_PrintString("ALL KEYS", 0, 127, 3, 10);
@ -45,7 +45,7 @@ void UI_DisplayWelcome(void)
char WelcomeString1[16];
memset(gStatusLine, 0, sizeof(gStatusLine));
memset(gFrameBuffer, 0, sizeof(gFrameBuffer));
UI_DisplayClear();
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_NONE)
{
@ -83,4 +83,3 @@ void UI_DisplayWelcome(void)
ST7565_BlitFullScreen();
}
}