This commit is contained in:
102
app/app.c
102
app/app.c
@@ -186,10 +186,6 @@ static void CheckForIncoming(void) {
|
||||
|
||||
static void HandleIncoming(void) {
|
||||
if (!g_SquelchLost) { // squelch is closed
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
if (gDTMF_RX_index > 0)
|
||||
DTMF_clear_RX();
|
||||
#endif
|
||||
if (gCurrentFunction != FUNCTION_FOREGROUND) {
|
||||
FUNCTION_Select(FUNCTION_FOREGROUND);
|
||||
gUpdateDisplay = true;
|
||||
@@ -217,30 +213,6 @@ static void HandleIncoming(void) {
|
||||
} else if (!bFlag)
|
||||
return;
|
||||
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
if (gScanStateDir == SCAN_OFF && (gRxVfo->DTMF_DECODING_ENABLE)) {
|
||||
|
||||
// DTMF DCD is enabled
|
||||
DTMF_HandleRequest();
|
||||
if (gDTMF_CallState == DTMF_CALL_STATE_NONE) {
|
||||
if (gRxReceptionMode != RX_MODE_DETECTED) {
|
||||
return;
|
||||
}
|
||||
gDualWatchCountdown_10ms = dual_watch_count_after_1_10ms;
|
||||
gScheduleDualWatch = false;
|
||||
|
||||
gRxReceptionMode = RX_MODE_LISTENING;
|
||||
|
||||
// let the user see DW is not active
|
||||
gDualWatchActive = false;
|
||||
gUpdateStatus = true;
|
||||
|
||||
gUpdateDisplay = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
APP_StartListening(gMonitor ? FUNCTION_MONITOR : FUNCTION_RECEIVE);
|
||||
}
|
||||
|
||||
@@ -670,21 +642,6 @@ static void CheckRadioInterrupts(void) {
|
||||
gUpdateDisplay = true;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
if (gRxVfo->DTMF_DECODING_ENABLE) {
|
||||
if (gDTMF_RX_index >= sizeof(gDTMF_RX) - 1) { // make room
|
||||
memmove(&gDTMF_RX[0], &gDTMF_RX[1], sizeof(gDTMF_RX) - 1);
|
||||
gDTMF_RX_index--;
|
||||
}
|
||||
gDTMF_RX[gDTMF_RX_index++] = c;
|
||||
gDTMF_RX[gDTMF_RX_index] = 0;
|
||||
gDTMF_RX_timeout = DTMF_RX_timeout_500ms; // time till we delete it
|
||||
gDTMF_RX_pending = true;
|
||||
|
||||
SYSTEM_DelayMs(3);//fix DTMF not reply@Yurisu
|
||||
DTMF_HandleRequest();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -834,9 +791,6 @@ static void HandleVox(void) {
|
||||
FUNCTION_Select(FUNCTION_FOREGROUND);
|
||||
|
||||
if (gCurrentFunction != FUNCTION_TRANSMIT && !SerialConfigInProgress()) {
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
gDTMF_ReplyState = DTMF_REPLY_NONE;
|
||||
#endif
|
||||
RADIO_PrepareTX();
|
||||
gUpdateDisplay = true;
|
||||
}
|
||||
@@ -941,9 +895,6 @@ void APP_Update(void) {
|
||||
#endif
|
||||
#ifdef ENABLE_FMRADIO
|
||||
&& !gFmRadioMode
|
||||
#endif
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
&& gDTMF_CallState == DTMF_CALL_STATE_NONE
|
||||
#endif
|
||||
) {
|
||||
DualwatchAlternate(); // toggle between the two VFO's
|
||||
@@ -981,9 +932,6 @@ void APP_Update(void) {
|
||||
#ifdef ENABLE_FMRADIO
|
||||
|| gFmRadioMode
|
||||
#endif
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
|| gDTMF_CallState != DTMF_CALL_STATE_NONE
|
||||
#endif
|
||||
#ifdef ENABLE_NOAA
|
||||
|| (gIsNoaaMode && (IS_NOAA_CHANNEL(gEeprom.ScreenChannel[0]) || IS_NOAA_CHANNEL(gEeprom.ScreenChannel[1])))
|
||||
#endif
|
||||
@@ -1434,11 +1382,6 @@ void APP_TimeSlice500ms(void) {
|
||||
if (--gMenuCountdown == 0)
|
||||
exit_menu = (gScreenToDisplay == DISPLAY_MENU); // exit menu mode
|
||||
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
if (gDTMF_RX_timeout > 0)
|
||||
if (--gDTMF_RX_timeout == 0)
|
||||
DTMF_clear_RX();
|
||||
#endif
|
||||
|
||||
// Skipped authentic device check
|
||||
|
||||
@@ -1625,33 +1568,6 @@ void APP_TimeSlice500ms(void) {
|
||||
FSKModem_TimeSlice500ms();
|
||||
UI_MAIN_TimeSlice500ms();
|
||||
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
if (gCurrentFunction != FUNCTION_TRANSMIT) {
|
||||
if (gDTMF_DecodeRingCountdown_500ms > 0) {
|
||||
// make "ring-ring" sound
|
||||
gDTMF_DecodeRingCountdown_500ms--;
|
||||
AUDIO_PlayBeep(BEEP_880HZ_200MS);
|
||||
}
|
||||
} else {
|
||||
gDTMF_DecodeRingCountdown_500ms = 0;
|
||||
}
|
||||
|
||||
if (gDTMF_CallState != DTMF_CALL_STATE_NONE && gCurrentFunction != FUNCTION_TRANSMIT
|
||||
&& gCurrentFunction != FUNCTION_RECEIVE && gDTMF_auto_reset_time_500ms > 0
|
||||
&& --gDTMF_auto_reset_time_500ms == 0) {
|
||||
gUpdateDisplay = true;
|
||||
if (gDTMF_CallState == DTMF_CALL_STATE_RECEIVED && gEeprom.DTMF_auto_reset_time >= DTMF_HOLD_MAX) {
|
||||
gDTMF_CallState = DTMF_CALL_STATE_RECEIVED_STAY; // keep message on-screen till a key is pressed
|
||||
} else {
|
||||
gDTMF_CallState = DTMF_CALL_STATE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
if (gDTMF_IsTx && gDTMF_TxStopCountdown_500ms > 0 && --gDTMF_TxStopCountdown_500ms == 0) {
|
||||
gDTMF_IsTx = false;
|
||||
gUpdateDisplay = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ALARM) || defined(ENABLE_TX1750)
|
||||
@@ -1767,18 +1683,6 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
|
||||
if (gScreenToDisplay == DISPLAY_MENU) // 1of11
|
||||
gMenuCountdown = menu_timeout_500ms;
|
||||
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
if (gDTMF_DecodeRingCountdown_500ms > 0) { // cancel the ringing
|
||||
gDTMF_DecodeRingCountdown_500ms = 0;
|
||||
|
||||
AUDIO_PlayBeep(BEEP_1KHZ_60MS_OPTIONAL);
|
||||
|
||||
if (Key != KEY_PTT) {
|
||||
gPttWasReleased = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool lowBatPopup = gLowBattery && !gLowBatteryConfirmed && gScreenToDisplay == DISPLAY_MAIN;
|
||||
@@ -2030,12 +1934,6 @@ static void ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) {
|
||||
|
||||
RADIO_SetupRegisters(true);
|
||||
|
||||
#ifdef ENABLE_DTMF_CALLING
|
||||
gDTMF_auto_reset_time_500ms = 0;
|
||||
gDTMF_CallState = DTMF_CALL_STATE_NONE;
|
||||
gDTMF_TxStopCountdown_500ms = 0;
|
||||
gDTMF_IsTx = false;
|
||||
#endif
|
||||
|
||||
gVFO_RSSI_bar_level[0] = 0;
|
||||
gVFO_RSSI_bar_level[1] = 0;
|
||||
|
||||
Reference in New Issue
Block a user