From f18a23bb46dd3c8a1b501b4748e68d61d885a99c Mon Sep 17 00:00:00 2001 From: "M. Umar Shahbaz" Date: Sat, 31 Aug 2024 22:56:30 +0500 Subject: [PATCH] trying USB? --- oscilloscope.html | 76 +++++++++++++++++++++++++++++---- scripts/Serial.js | 0 scripts/oscilloscope-setting.js | 5 +-- 3 files changed, 70 insertions(+), 11 deletions(-) delete mode 100644 scripts/Serial.js diff --git a/oscilloscope.html b/oscilloscope.html index bf4396e..feef91b 100644 --- a/oscilloscope.html +++ b/oscilloscope.html @@ -8,24 +8,56 @@ - - - - - - Oscilloscope + - diff --git a/scripts/Serial.js b/scripts/Serial.js deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/oscilloscope-setting.js b/scripts/oscilloscope-setting.js index fef40b9..0938ac7 100644 --- a/scripts/oscilloscope-setting.js +++ b/scripts/oscilloscope-setting.js @@ -4,7 +4,6 @@ if (!window.settings) { document.getElementById('settingsForm').addEventListener('submit', async(event) => { event.preventDefault(); - const port = await navigator.serial.requestPort(); const formData = new FormData(event.target); window.settings = { drawPoints: formData.get('drawPoints') !== null, @@ -17,9 +16,9 @@ document.getElementById('settingsForm').addEventListener('submit', async(event) minX: parseInt(formData.get('minX')), maxX: parseInt(formData.get('maxX')), xGap: parseFloat(formData.get('xGap')), - baud: parseInt(formData.get('baudrate')), - port: port + baud: parseInt(formData.get('baudrate')) }; sessionStorage.setItem('settings', JSON.stringify(settings)); + //console.log(settings); window.location.href = "oscilloscope.html"; }); \ No newline at end of file