Improve channel input (eeprom writes)

This commit is contained in:
Armel FAUVEAU
2024-06-29 22:33:53 +02:00
parent 0dc01d590b
commit 45987500f2
2 changed files with 11 additions and 2 deletions

View File

@@ -1466,6 +1466,12 @@ void APP_TimeSlice500ms(void)
{ {
if (--gKeyInputCountdown == 0) if (--gKeyInputCountdown == 0)
{ {
if (IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE) && (gInputBoxIndex == 1 || gInputBoxIndex == 2))
{
SETTINGS_SaveVfoIndices();
}
cancelUserInputModes(); cancelUserInputModes();
if (gBeepToPlay != BEEP_NONE) if (gBeepToPlay != BEEP_NONE)

View File

@@ -340,7 +340,10 @@ void channelMove(uint16_t Channel, bool End)
gVfoConfigureMode = VFO_CONFIGURE_RELOAD; gVfoConfigureMode = VFO_CONFIGURE_RELOAD;
RADIO_ConfigureChannel(gEeprom.TX_VFO, gVfoConfigureMode); RADIO_ConfigureChannel(gEeprom.TX_VFO, gVfoConfigureMode);
if(End)
{
SETTINGS_SaveVfoIndices(); SETTINGS_SaveVfoIndices();
}
return; return;
} }
@@ -378,7 +381,7 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
if (IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE)) { // user is entering channel number if (IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE)) { // user is entering channel number
gKeyInputCountdown = (key_input_timeout_500ms / 6); // short time... gKeyInputCountdown = (key_input_timeout_500ms / 5); // short time...
if (gInputBoxIndex != 3) { if (gInputBoxIndex != 3) {
#ifdef ENABLE_VOICE #ifdef ENABLE_VOICE