You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-26 14:11:59 +01:00
Improve small tune step logic to fix bug
Remove variable for small tune step to fix double assignment error.
This commit is contained in:
@@ -329,12 +329,10 @@ function checkKey(e) {
|
||||
socket.send("T" + (currentFreq.toFixed(1) * 1000));
|
||||
break;
|
||||
case 38:
|
||||
let smallStep = (currentFreq > 30) ? 10 : 1;
|
||||
socket.send("T" + (Math.round(currentFreq*1000) + smallStep));
|
||||
socket.send("T" + (Math.round(currentFreq*1000) + ((currentFreq > 30) ? 10 : 1)));
|
||||
break;
|
||||
case 40:
|
||||
let smallStep = (currentFreq > 30) ? 10 : 1;
|
||||
socket.send("T" + (Math.round(currentFreq*1000) - smallStep));
|
||||
socket.send("T" + (Math.round(currentFreq*1000) - ((currentFreq > 30) ? 10 : 1)));
|
||||
break;
|
||||
case 37:
|
||||
tuneDown();
|
||||
|
||||
Reference in New Issue
Block a user