mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-07-30 16:59:15 +02: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:
+2
-4
@@ -329,12 +329,10 @@ function checkKey(e) {
|
|||||||
socket.send("T" + (currentFreq.toFixed(1) * 1000));
|
socket.send("T" + (currentFreq.toFixed(1) * 1000));
|
||||||
break;
|
break;
|
||||||
case 38:
|
case 38:
|
||||||
let smallStep = (currentFreq > 30) ? 10 : 1;
|
socket.send("T" + (Math.round(currentFreq*1000) + ((currentFreq > 30) ? 10 : 1)));
|
||||||
socket.send("T" + (Math.round(currentFreq*1000) + smallStep));
|
|
||||||
break;
|
break;
|
||||||
case 40:
|
case 40:
|
||||||
let smallStep = (currentFreq > 30) ? 10 : 1;
|
socket.send("T" + (Math.round(currentFreq*1000) - ((currentFreq > 30) ? 10 : 1)));
|
||||||
socket.send("T" + (Math.round(currentFreq*1000) - smallStep));
|
|
||||||
break;
|
break;
|
||||||
case 37:
|
case 37:
|
||||||
tuneDown();
|
tuneDown();
|
||||||
|
|||||||
Reference in New Issue
Block a user