From 09822cc285a2b4b019fbeb92b56b4111688ec588 Mon Sep 17 00:00:00 2001 From: Adam Wisher <37659188+mrwish7@users.noreply.github.com> Date: Fri, 9 Feb 2024 09:26:32 +0000 Subject: [PATCH] Improve small tune step logic to fix bug Remove variable for small tune step to fix double assignment error. --- web/js/main.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web/js/main.js b/web/js/main.js index 4dc4f5b..3082fed 100644 --- a/web/js/main.js +++ b/web/js/main.js @@ -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();