diff --git a/V203/usb/scope/bin/index.js b/V203/usb/scope/bin/index.js index ec86fea..61ef536 100644 --- a/V203/usb/scope/bin/index.js +++ b/V203/usb/scope/bin/index.js @@ -57,11 +57,17 @@ function initWebSocket() { websocket.onopen = function (evt) { ConnectBut.value = 'Disconnect'; Connected.innerHTML = 'CONNECTED'; + const stored = localStorage.getItem ('mark_store'); + console.log (stored); + if (stored) { + gMark = JSON.parse (stored); + } connected = true; }; websocket.onclose = function (evt) { ConnectBut.value = 'Connect'; Connected.innerHTML = 'DISCONNECTED'; + localStorage.setItem ('mark_store', JSON.stringify (gMark)); connected = false; }; websocket.onmessage = function (evt) {