Renamed some DTMF variables.

This commit is contained in:
Dual Tachyon 2023-08-30 10:23:02 +01:00
parent 544dc0150b
commit f7fdc68110
3 changed files with 16 additions and 16 deletions

View File

@ -178,18 +178,18 @@ void APP_CheckDTMFStuff(void)
switch (gEeprom.DTMF_DECODE_RESPONSE) {
case 3:
g_200003C1 = true;
g_200003C4 = 20;
gDTMF_DecodeRing = true;
gDTMF_DecodeRingCountdown = 20;
// Fallthrough
case 2:
g_200003BE = 3;
break;
case 1:
g_200003C1 = true;
g_200003C4 = 20;
gDTMF_DecodeRing = true;
gDTMF_DecodeRingCountdown = 20;
break;
default:
g_200003C1 = false;
gDTMF_DecodeRing = false;
g_200003BE = 0;
break;
}
@ -1337,13 +1337,13 @@ LAB_00004b08:
gUpdateDisplay = true;
}
}
if (g_200003C1 == 1 && g_200003C4) {
g_200003C4--;
if ((g_200003C4 % 3) == 0) {
if (gDTMF_DecodeRing && gDTMF_DecodeRingCountdown) {
gDTMF_DecodeRingCountdown--;
if ((gDTMF_DecodeRingCountdown % 3) == 0) {
AUDIO_PlayBeep(BEEP_440HZ_500MS);
}
if (g_200003C4 == 0) {
g_200003C1 = 0;
if (gDTMF_DecodeRingCountdown == 0) {
gDTMF_DecodeRing = false;
}
}
}
@ -1902,8 +1902,8 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
g_20000393 = 0x10;
}
BACKLIGHT_TurnOn();
if (g_200003C1 == 1) {
g_200003C1 = 0;
if (gDTMF_DecodeRing) {
gDTMF_DecodeRing = false;
AUDIO_PlayBeep(BEEP_1KHZ_60MS_OPTIONAL);
if (Key != KEY_PTT) {
g_20000394 = true;

4
misc.c
View File

@ -111,9 +111,9 @@ uint8_t g_200003BC;
uint8_t g_200003BD;
uint8_t g_200003BE;
uint8_t g_200003C0;
bool g_200003C1;
bool gDTMF_DecodeRing;
uint8_t g_200003C3;
uint8_t g_200003C4;
uint8_t gDTMF_DecodeRingCountdown;
uint8_t gDTMFChosenContact;
uint16_t g_200003E2;
volatile uint16_t gFlashLightBlinkCounter;

4
misc.h
View File

@ -135,9 +135,9 @@ extern uint8_t g_200003BC;
extern uint8_t g_200003BD;
extern uint8_t g_200003BE;
extern uint8_t g_200003C0;
extern bool g_200003C1;
extern bool gDTMF_DecodeRing;
extern uint8_t g_200003C3;
extern uint8_t g_200003C4;
extern uint8_t gDTMF_DecodeRingCountdown;
extern uint8_t gDTMFChosenContact;
extern uint16_t g_200003E2;
extern volatile uint16_t gFlashLightBlinkCounter;