diff --git a/App/app/app.c b/App/app/app.c index 7946677f..0fa96526 100644 --- a/App/app/app.c +++ b/App/app/app.c @@ -1538,11 +1538,20 @@ void CheckKeys(void) #ifdef ENABLE_FEAT_F4HWN if (gSetting_set_ptt_session) { - if ((isPressed && (gPttOnePushCounter == 0 || gPttOnePushCounter == 2)) || - (!isPressed && (gPttOnePushCounter == 1 || gPttOnePushCounter == 3)) || - serialConfigInProgress) + if (serialConfigInProgress) { - if (++gPttDebounceCounter >= 3 || (serialConfigInProgress && gPttOnePushCounter > 0)) + gPttDebounceCounter = 0; + + if (gPttOnePushCounter > 0 || gPttIsPressed) + { + StopTransmitting(); + gPttOnePushCounter = 0; + } + } + else if ((isPressed && (gPttOnePushCounter == 0 || gPttOnePushCounter == 2)) || + (!isPressed && (gPttOnePushCounter == 1 || gPttOnePushCounter == 3))) + { + if (++gPttDebounceCounter >= 3) { gPttDebounceCounter = 0; @@ -1553,7 +1562,7 @@ void CheckKeys(void) gPttOnePushCounter = 1; ProcessKey(KEY_PTT, true, false); } - else if (gPttOnePushCounter == 3 || serialConfigInProgress) + else if (gPttOnePushCounter == 3) { // stop transmitting StopTransmitting(); gPttOnePushCounter = 0; diff --git a/App/app/uart.c b/App/app/uart.c index fccdaf19..fbbc017b 100644 --- a/App/app/uart.c +++ b/App/app/uart.c @@ -911,7 +911,6 @@ void UART_HandleCommand(uint32_t Port) case 0x0720: // slot info: read the 64-byte header only (fast, no CRC) { if (pUART_Command->Header.Size < 1u) break; // needs Data[0] (slot) - gSerialConfigCountDown_500ms = 12; // keep serial mode alive (6 s) uint8_t slot = pUART_Command->Data[0]; mb_slot_header_t hdr; memset(&hdr, 0, sizeof(hdr));