This commit is contained in:
54
ui/main.c
54
ui/main.c
@@ -167,9 +167,7 @@ void UI_DisplayAudioBar(void) {
|
||||
|
||||
if (gCurrentFunction != FUNCTION_TRANSMIT ||
|
||||
gScreenToDisplay != DISPLAY_MAIN
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
||||
#endif
|
||||
|
||||
) {
|
||||
return; // screen is in use
|
||||
}
|
||||
@@ -269,9 +267,6 @@ void DisplayRSSIBar(const bool now) {
|
||||
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT ||
|
||||
gScreenToDisplay != DISPLAY_MAIN
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
||||
#endif
|
||||
)
|
||||
return; // display is in use
|
||||
|
||||
@@ -433,6 +428,7 @@ void UI_DisplayMain(void) {
|
||||
// clear the screen
|
||||
UI_DisplayClear();
|
||||
|
||||
|
||||
if (gLowBattery && !gLowBatteryConfirmed) {
|
||||
UI_DisplayPopup("LOW BAT");
|
||||
ST7565_BlitFullScreen();
|
||||
@@ -550,41 +546,9 @@ void UI_DisplayMain(void) {
|
||||
#endif
|
||||
|
||||
if (gDTMF_InputMode
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE || gDTMF_IsTx
|
||||
#endif
|
||||
) {
|
||||
char *pPrintStr = "";
|
||||
// show DTMF stuff
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
char Contact[16];
|
||||
if (!gDTMF_InputMode) {
|
||||
if (gDTMF_CallState == DTMF_CALL_STATE_CALL_OUT) {
|
||||
pPrintStr = DTMF_FindContact(gDTMF_String, Contact) ? Contact : gDTMF_String;
|
||||
} else if (gDTMF_CallState == DTMF_CALL_STATE_RECEIVED ||
|
||||
gDTMF_CallState == DTMF_CALL_STATE_RECEIVED_STAY) {
|
||||
pPrintStr = DTMF_FindContact(gDTMF_Callee, Contact) ? Contact : gDTMF_Callee;
|
||||
} else if (gDTMF_IsTx) {
|
||||
pPrintStr = gDTMF_String;
|
||||
}
|
||||
}
|
||||
|
||||
UI_PrintString(pPrintStr, 2, 0, 2 + (vfo_num * 3) /*, 8 */);
|
||||
|
||||
pPrintStr = "";
|
||||
if (!gDTMF_InputMode) {
|
||||
if (gDTMF_CallState == DTMF_CALL_STATE_CALL_OUT) {
|
||||
pPrintStr = (gDTMF_State == DTMF_STATE_CALL_OUT_RSP) ? "CALL OUT(RSP)" : "CALL OUT";
|
||||
} else if (gDTMF_CallState == DTMF_CALL_STATE_RECEIVED ||
|
||||
gDTMF_CallState == DTMF_CALL_STATE_RECEIVED_STAY) {
|
||||
sprintf(String, "CALL FRM:%s",
|
||||
(DTMF_FindContact(gDTMF_Caller, Contact)) ? Contact : gDTMF_Caller);
|
||||
pPrintStr = String;
|
||||
} else if (gDTMF_IsTx) {
|
||||
pPrintStr = (gDTMF_State == DTMF_STATE_TX_SUCC) ? "DTMF TX(SUCC)" : "DTMF TX";
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
sprintf(String, ">%s", gDTMF_InputBox);
|
||||
pPrintStr = String;
|
||||
@@ -1032,11 +996,6 @@ void UI_DisplayMain(void) {
|
||||
UI_PrintStringSmallNormal("N", LCD_WIDTH + 70, 0, line + 1);
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
// show the DTMF decoding symbol
|
||||
if (vfoInfo->DTMF_DECODING_ENABLE)
|
||||
UI_PrintStringSmallNormal("DTMF", LCD_WIDTH + 78, 0, line + 1);
|
||||
#endif
|
||||
|
||||
// show the audio scramble symbol
|
||||
if (vfoInfo->SCRAMBLING_TYPE > 0) {
|
||||
@@ -1077,9 +1036,6 @@ void UI_DisplayMain(void) {
|
||||
if (rx && gEeprom.VfoInfo[gEeprom.RX_VFO].Modulation == MODULATION_AM && gSetting_AM_fix)
|
||||
{
|
||||
if (gScreenToDisplay != DISPLAY_MAIN
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
||||
#endif
|
||||
)
|
||||
return;
|
||||
|
||||
@@ -1103,9 +1059,6 @@ void UI_DisplayMain(void) {
|
||||
const unsigned int idx = (len > (17 - 5)) ? len - (17 - 5) : 0; // limit to last 'n' chars
|
||||
|
||||
if (gScreenToDisplay != DISPLAY_MAIN
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
||||
#endif
|
||||
)
|
||||
return;
|
||||
|
||||
@@ -1144,9 +1097,6 @@ void UI_DisplayMain(void) {
|
||||
else if (gChargingWithTypeC)
|
||||
{ // charging .. show the battery state
|
||||
if (gScreenToDisplay != DISPLAY_MAIN
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
||||
#endif
|
||||
)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user