0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-19 22:58:04 +03:00

Increased menu BATCAL, F-CALI and BATVOL timeouts to 2 mins + disable TX when serial config upload/download in progress

This commit is contained in:
OneOfEleven
2023-10-02 22:04:41 +01:00
parent bf2564b9f5
commit 87d1cf7c86
12 changed files with 127 additions and 103 deletions

View File

@ -225,10 +225,17 @@ static void CMD_0514(const uint8_t *pBuffer)
const CMD_0514_t *pCmd = (const CMD_0514_t *)pBuffer;
Timestamp = pCmd->Timestamp;
#ifdef ENABLE_FMRADIO
gFmRadioCountdown_500ms = fm_radio_countdown_500ms;
#endif
gSerialConfigCountDown_500ms = 6; // 3 sec
gSerialConfigCountDown_done = false;
// turn the LCD backlight off
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
SendVersion();
}
@ -241,9 +248,13 @@ static void CMD_051B(const uint8_t *pBuffer)
if (pCmd->Timestamp != Timestamp)
return;
gSerialConfigCountDown_500ms = 6; // 3 sec
gSerialConfigCountDown_done = false;
#ifdef ENABLE_FMRADIO
gFmRadioCountdown_500ms = fm_radio_countdown_500ms;
#endif
memset(&Reply, 0, sizeof(Reply));
Reply.Header.ID = 0x051C;
Reply.Header.Size = pCmd->Size + 4;
@ -269,11 +280,15 @@ static void CMD_051D(const uint8_t *pBuffer)
if (pCmd->Timestamp != Timestamp)
return;
gSerialConfigCountDown_500ms = 6; // 3 sec
gSerialConfigCountDown_done = false;
bReloadEeprom = false;
#ifdef ENABLE_FMRADIO
gFmRadioCountdown_500ms = fm_radio_countdown_500ms;
#endif
Reply.Header.ID = 0x051E;
Reply.Header.Size = sizeof(Reply.Data);
Reply.Data.Offset = pCmd->Offset;
@ -389,8 +404,12 @@ static void CMD_052F(const uint8_t *pBuffer)
if (gCurrentFunction == FUNCTION_POWER_SAVE)
FUNCTION_Select(FUNCTION_FOREGROUND);
gSerialConfigCountDown_500ms = 6; // 3 sec
gSerialConfigCountDown_done = false;
Timestamp = pCmd->Timestamp;
// turn the LCD backlight off
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
SendVersion();