Enable/disable DTMF calling compile option
This commit is contained in:
57
ui/main.c
57
ui/main.c
@@ -108,8 +108,11 @@ void UI_DisplayAudioBar(void)
|
||||
const unsigned int line = 3;
|
||||
|
||||
if (gCurrentFunction != FUNCTION_TRANSMIT ||
|
||||
gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
gScreenToDisplay != DISPLAY_MAIN
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
||||
#endif
|
||||
)
|
||||
{
|
||||
return; // screen is in use
|
||||
}
|
||||
@@ -163,8 +166,11 @@ static void DisplayRSSIBar(const int16_t rssi, const bool now)
|
||||
return; // display is in use
|
||||
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT ||
|
||||
gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
gScreenToDisplay != DISPLAY_MAIN
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
||||
#endif
|
||||
)
|
||||
return; // display is in use
|
||||
|
||||
if (now)
|
||||
@@ -293,13 +299,20 @@ void UI_DisplayMain(void)
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
if (gDTMF_CallState != DTMF_CALL_STATE_NONE || gDTMF_IsTx || gDTMF_InputMode)
|
||||
{ // show DTMF stuff
|
||||
|
||||
|
||||
if (
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE || gDTMF_IsTx ||
|
||||
#endif
|
||||
gDTMF_InputMode)
|
||||
{ // show DTMF stuff
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
char Contact[16];
|
||||
|
||||
if (!gDTMF_InputMode)
|
||||
{
|
||||
|
||||
memset(Contact, 0, sizeof(Contact));
|
||||
if (gDTMF_CallState == DTMF_CALL_STATE_CALL_OUT)
|
||||
strcpy(String, (gDTMF_State == DTMF_STATE_CALL_OUT_RSP) ? "CALL OUT(RSP)" : "CALL OUT");
|
||||
@@ -311,14 +324,14 @@ void UI_DisplayMain(void)
|
||||
strcpy(String, (gDTMF_State == DTMF_STATE_TX_SUCC) ? "DTMF TX(SUCC)" : "DTMF TX");
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
sprintf(String, ">%s", gDTMF_InputBox);
|
||||
}
|
||||
UI_PrintString(String, 2, 0, 0 + (vfo_num * 3), 8);
|
||||
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
memset(String, 0, sizeof(String));
|
||||
if (!gDTMF_InputMode)
|
||||
{
|
||||
if (!gDTMF_InputMode) {
|
||||
memset(Contact, 0, sizeof(Contact));
|
||||
if (gDTMF_CallState == DTMF_CALL_STATE_CALL_OUT)
|
||||
sprintf(String, ">%s", (DTMF_FindContact(gDTMF_String, Contact)) ? Contact : gDTMF_String);
|
||||
@@ -329,8 +342,9 @@ void UI_DisplayMain(void)
|
||||
if (gDTMF_IsTx)
|
||||
sprintf(String, ">%s", gDTMF_String);
|
||||
}
|
||||
UI_PrintString(String, 2, 0, 2 + (vfo_num * 3), 8);
|
||||
|
||||
UI_PrintString(String, 2, 0, 2 + (vfo_num * 3), 8);
|
||||
#endif
|
||||
center_line = CENTER_LINE_IN_USE;
|
||||
continue;
|
||||
}
|
||||
@@ -646,9 +660,11 @@ void UI_DisplayMain(void)
|
||||
UI_PrintStringSmall(String, LCD_WIDTH + 70, 0, line + 1);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
// show the DTMF decoding symbol
|
||||
if (gEeprom.VfoInfo[vfo_num].DTMF_DECODING_ENABLE || gSetting_KILLED)
|
||||
UI_PrintStringSmall("DTMF", LCD_WIDTH + 78, 0, line + 1);
|
||||
#endif
|
||||
|
||||
// show the audio scramble symbol
|
||||
if (gEeprom.VfoInfo[vfo_num].SCRAMBLING_TYPE > 0 && gSetting_ScrambleEnable)
|
||||
@@ -673,8 +689,11 @@ void UI_DisplayMain(void)
|
||||
#if defined(ENABLE_AM_FIX) && defined(ENABLE_AM_FIX_SHOW_DATA)
|
||||
if (rx && gEeprom.VfoInfo[gEeprom.RX_VFO].Modulation == MODULATION_AM && gSetting_AM_fix)
|
||||
{
|
||||
if (gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
if (gScreenToDisplay != DISPLAY_MAIN
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
||||
#endif
|
||||
)
|
||||
return;
|
||||
|
||||
center_line = CENTER_LINE_AM_FIX_DATA;
|
||||
@@ -699,8 +718,11 @@ void UI_DisplayMain(void)
|
||||
const unsigned int len = strlen(gDTMF_RX_live);
|
||||
const unsigned int idx = (len > (17 - 5)) ? len - (17 - 5) : 0; // limit to last 'n' chars
|
||||
|
||||
if (gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
if (gScreenToDisplay != DISPLAY_MAIN
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
||||
#endif
|
||||
)
|
||||
return;
|
||||
|
||||
center_line = CENTER_LINE_DTMF_DEC;
|
||||
@@ -730,8 +752,11 @@ void UI_DisplayMain(void)
|
||||
#ifdef ENABLE_SHOW_CHARGE_LEVEL
|
||||
else if (gChargingWithTypeC)
|
||||
{ // charging .. show the battery state
|
||||
if (gScreenToDisplay != DISPLAY_MAIN ||
|
||||
gDTMF_CallState != DTMF_CALL_STATE_NONE)
|
||||
if (gScreenToDisplay != DISPLAY_MAIN
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
||||
#endif
|
||||
)
|
||||
return;
|
||||
|
||||
center_line = CENTER_LINE_CHARGE_DATA;
|
||||
|
Reference in New Issue
Block a user