diff --git a/app/scanner.c b/app/scanner.c index 301c213..d93aeaa 100644 --- a/app/scanner.c +++ b/app/scanner.c @@ -203,7 +203,6 @@ void SCANNER_Key_MENU(bool bKeyPressed, bool bKeyHeld) } void SCANNER_Key_STAR(bool bKeyPressed, bool bKeyHeld) - { if ((!bKeyHeld) && (bKeyPressed)) { gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL; diff --git a/radio.c b/radio.c index d476be5..f8ae0aa 100644 --- a/radio.c +++ b/radio.c @@ -725,12 +725,10 @@ void RADIO_SomethingWithTransmit(void) Value = 1; } else if (gBatteryDisplayLevel == 0) { Value = 2; - } else { - // TODO: Fix this goto, a bit painful to disentangle - if (gBatteryDisplayLevel != 6) { - goto LAB_00007c20; - } + } else if (gBatteryDisplayLevel == 6) { Value = 6; + } else { + goto Skip; } } else { Value = 3; @@ -738,28 +736,30 @@ void RADIO_SomethingWithTransmit(void) RADIO_SomethingElse(Value); g_20000383 = 0; AUDIO_PlayBeep(BEEP_500HZ_60MS_DOUBLE_BEEP_OPTIONAL); - } else { -LAB_00007c20: - if (g_200003BE == 1) { - if (g_20000438 == 2) { - g_200003BD = 1; - g_200003BC = 0; - g_200003C3 = 6; - } else { - g_200003BC = 1; - g_200003BD = 0; - } - } - FUNCTION_Select(FUNCTION_TRANSMIT); - if (g_20000383 == 0) { - gTxTimerCountdown = gEeprom.TX_TIMEOUT_TIMER * 120; - } else { - gTxTimerCountdown = 0; - } - gTxTimeoutReached = false; - g_200003FD = 0; - gRTTECountdown = 0; + g_200003BE = 0; + return; } + +Skip: + if (g_200003BE == 1) { + if (g_20000438 == 2) { + g_200003BD = 1; + g_200003BC = 0; + g_200003C3 = 6; + } else { + g_200003BC = 1; + g_200003BD = 0; + } + } + FUNCTION_Select(FUNCTION_TRANSMIT); + if (g_20000383 == 0) { + gTxTimerCountdown = gEeprom.TX_TIMEOUT_TIMER * 120; + } else { + gTxTimerCountdown = 0; + } + gTxTimeoutReached = false; + g_200003FD = 0; + gRTTECountdown = 0; g_200003BE = 0; }