Add missing UI_DisplayClear()

This commit is contained in:
Juan Antonio
2023-12-26 02:57:20 +01:00
parent 1882ab0cc1
commit cceba5a474

View File

@@ -29,9 +29,11 @@
void UI_DisplayAircopy(void) void UI_DisplayAircopy(void)
{ {
char String[16] = {0}; char String[16] = { 0 };
char *pPrintStr = { 0 }; char *pPrintStr = { 0 };
UI_DisplayClear();
if (gAircopyState == AIRCOPY_READY) { if (gAircopyState == AIRCOPY_READY) {
pPrintStr = "AIR COPY(RDY)"; pPrintStr = "AIR COPY(RDY)";
} else if (gAircopyState == AIRCOPY_TRANSFER) { } else if (gAircopyState == AIRCOPY_TRANSFER) {
@@ -42,8 +44,7 @@ void UI_DisplayAircopy(void)
UI_PrintString(pPrintStr, 2, 127, 0, 8); UI_PrintString(pPrintStr, 2, 127, 0, 8);
if (gInputBoxIndex == 0) if (gInputBoxIndex == 0) {
{
uint32_t frequency = gRxVfo->freq_config_RX.Frequency; uint32_t frequency = gRxVfo->freq_config_RX.Frequency;
sprintf(String, "%3u.%05u", frequency / 100000, frequency % 100000); sprintf(String, "%3u.%05u", frequency / 100000, frequency % 100000);
// show the remaining 2 small frequency digits // show the remaining 2 small frequency digits
@@ -51,19 +52,18 @@ void UI_DisplayAircopy(void)
String[7] = 0; String[7] = 0;
// show the main large frequency digits // show the main large frequency digits
UI_DisplayFrequency(String, 16, 2, false); UI_DisplayFrequency(String, 16, 2, false);
} } else {
else { const char *ascii = INPUTBOX_GetAscii();
const char * ascii = INPUTBOX_GetAscii(); sprintf(String, "%.3s.%.3s", ascii, ascii + 3);
sprintf(String, "%.3s.%.3s",ascii, ascii + 3);
UI_DisplayFrequency(String, 16, 2, false); UI_DisplayFrequency(String, 16, 2, false);
} }
memset(String, 0, sizeof(String)); memset(String, 0, sizeof(String));
if (gAirCopyIsSendMode == 0) if (gAirCopyIsSendMode == 0) {
sprintf(String, "RCV:%u E:%u", gAirCopyBlockNumber, gErrorsDuringAirCopy); sprintf(String, "RCV:%u E:%u", gAirCopyBlockNumber, gErrorsDuringAirCopy);
else } else if (gAirCopyIsSendMode == 1) {
if (gAirCopyIsSendMode == 1)
sprintf(String, "SND:%u", gAirCopyBlockNumber); sprintf(String, "SND:%u", gAirCopyBlockNumber);
}
UI_PrintString(String, 2, 127, 4, 8); UI_PrintString(String, 2, 127, 4, 8);
ST7565_BlitFullScreen(); ST7565_BlitFullScreen();