Fix issue #173
This commit is contained in:
20
app/app.c
20
app/app.c
@@ -1473,26 +1473,6 @@ void APP_TimeSlice500ms(void)
|
||||
}
|
||||
|
||||
cancelUserInputModes();
|
||||
|
||||
if (gBeepToPlay != BEEP_NONE)
|
||||
{
|
||||
AUDIO_PlayBeep(gBeepToPlay);
|
||||
gBeepToPlay = BEEP_NONE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE)) { // user is entering channel number
|
||||
switch (gInputBoxIndex)
|
||||
{
|
||||
case 1:
|
||||
channelMove(gInputBox[0] - 1, false);
|
||||
break;
|
||||
case 2:
|
||||
channelMove(((gInputBox[0] * 10) + gInputBox[1]) - 1, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
38
app/main.c
38
app/main.c
@@ -348,6 +348,29 @@ void channelMove(uint16_t Channel, bool End)
|
||||
return;
|
||||
}
|
||||
|
||||
void channelMoveSwitch(void) {
|
||||
if (IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE)) { // user is entering channel number
|
||||
switch (gInputBoxIndex)
|
||||
{
|
||||
case 1:
|
||||
if (gInputBox[0] != 0) {
|
||||
channelMove(gInputBox[0] - 1, false);
|
||||
}
|
||||
|
||||
break;
|
||||
case 2:
|
||||
if (!((gInputBox[0] == 0) && (gInputBox[1] == 0))) {
|
||||
channelMove(((gInputBox[0] * 10) + gInputBox[1]) - 1, false);
|
||||
}
|
||||
|
||||
break;
|
||||
case 3:
|
||||
channelMove(((gInputBox[0] * 100) + (gInputBox[1] * 10) + gInputBox[2]) - 1, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
{
|
||||
if (bKeyHeld) { // key held down
|
||||
@@ -402,23 +425,20 @@ static void MAIN_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
||||
}
|
||||
|
||||
const uint8_t Vfo = gEeprom.TX_VFO;
|
||||
gKeyInputCountdown = key_input_timeout_500ms;
|
||||
INPUTBOX_Append(Key);
|
||||
gKeyInputCountdown = key_input_timeout_500ms;
|
||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||
|
||||
if (IS_MR_CHANNEL(gTxVfo->CHANNEL_SAVE)) { // user is entering channel number
|
||||
channelMoveSwitch();
|
||||
|
||||
gKeyInputCountdown = (key_input_timeout_500ms / 5); // short time...
|
||||
|
||||
if (gInputBoxIndex != 3) {
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = (VOICE_ID_t)Key;
|
||||
#endif
|
||||
gRequestDisplayScreen = DISPLAY_MAIN;
|
||||
return;
|
||||
}
|
||||
#ifdef ENABLE_VOICE
|
||||
gAnotherVoiceID = (VOICE_ID_t)Key;
|
||||
#endif
|
||||
|
||||
channelMove(((gInputBox[0] * 100) + (gInputBox[1] * 10) + gInputBox[2]) - 1, true);
|
||||
return;
|
||||
}
|
||||
|
||||
// #ifdef ENABLE_NOAA
|
||||
|
Reference in New Issue
Block a user