Spectrum: decimal point deletion fix #148, slower buttons repeats
This commit is contained in:
@@ -534,6 +534,8 @@ static void UpdateFreqInput(KEY_Code_t key) {
|
||||
}
|
||||
if (key == KEY_EXIT) {
|
||||
freqInputIndex--;
|
||||
if(freqInputDotIndex==freqInputIndex)
|
||||
freqInputDotIndex = 0;
|
||||
} else {
|
||||
freqInputArr[freqInputIndex++] = key;
|
||||
}
|
||||
@@ -996,17 +998,18 @@ bool HandleUserInput() {
|
||||
kbd.prev = kbd.current;
|
||||
kbd.current = GetKey();
|
||||
|
||||
if (kbd.current == KEY_INVALID) {
|
||||
kbd.counter = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (kbd.current == kbd.prev && kbd.counter <= 16) {
|
||||
if (kbd.current != KEY_INVALID && kbd.current == kbd.prev) {
|
||||
if(kbd.counter < 16)
|
||||
kbd.counter++;
|
||||
else
|
||||
kbd.counter-=3;
|
||||
SYSTEM_DelayMs(20);
|
||||
}
|
||||
else {
|
||||
kbd.counter = 0;
|
||||
}
|
||||
|
||||
if (kbd.counter == 3 || kbd.counter > 16) {
|
||||
if (kbd.counter == 3 || kbd.counter == 16) {
|
||||
switch (currentState) {
|
||||
case SPECTRUM:
|
||||
OnKeyDown(kbd.current);
|
||||
|
Reference in New Issue
Block a user