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
Merge pull request #94 from mrwish7/main
Fix direct frequency entry rounding errors
This commit is contained in:
@@ -88,7 +88,7 @@ $(document).ready(function () {
|
||||
const inputValue = Number(textInput.val());
|
||||
// Check if the user agent contains 'iPhone'
|
||||
if (/iPhone/i.test(navigator.userAgent)) {
|
||||
socket.send("T" + (inputValue * 1000));
|
||||
socket.send("T" + (Math.round(inputValue * 1000)));
|
||||
// Clear the input field if needed
|
||||
textInput.val('');
|
||||
}
|
||||
@@ -118,7 +118,7 @@ $(document).ready(function () {
|
||||
if (event.key === 'Enter') {
|
||||
const inputValue = textInput.val();
|
||||
if (socket.readyState === WebSocket.OPEN) {
|
||||
socket.send("T" + (inputValue * 1000));
|
||||
socket.send("T" + (Math.round(inputValue * 1000)));
|
||||
}
|
||||
textInput.val('');
|
||||
}
|
||||
@@ -1129,4 +1129,4 @@ function fillPresets() {
|
||||
tuneTo(Number(presetText));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user