diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 2ab49b0..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,4 +0,0 @@ -# These are supported funding model platforms - -github: [SebCanet] -custom: ['https://paypal.me/sebcanet?locale.x=fr_FR'] diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json deleted file mode 100644 index 72616d2..0000000 --- a/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "configurations": [ - { - "name": "Win32", - "includePath": [ - "${workspaceFolder}/**" - ], - "defines": [ - "_DEBUG", - "UNICODE", - "_UNICODE" - ], - "windowsSdkVersion": "10.0.19041.0", - "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe", - "cStandard": "c17", - "cppStandard": "c++17", - "intelliSenseMode": "windows-msvc-x64" - } - ], - "version": 4 -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 7a73a41..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,2 +0,0 @@ -{ -} \ No newline at end of file diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b8070d8..9147bef 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -13,6 +13,7 @@ v0.9.0 - add conversion tool text <-> binary - add colors conversion tool - add conversion blocks to send data in SenML format +- add WebSerial API v0.8.1 - finish text blocks translation in Arudino code diff --git a/S4E/js/boards.js b/S4E/js/boards.js index 1a6b2b3..aa6aea1 100644 --- a/S4E/js/boards.js +++ b/S4E/js/boards.js @@ -67,8 +67,17 @@ Code.changeBoard = function() { document.getElementById("boardDescriptionSelector").value = newBoard; document.getElementById("boardSelected_span").textContent = profile["default"].description; document.getElementById("portSelected_span").textContent = ' : ' + document.getElementById('serialMenu').options[document.getElementById('serialMenu').selectedIndex].value; - localStorage.setItem("availableSpeed", JSON.stringify(profile.default['serialList'])); + sessionStorage.setItem("availableSpeed", JSON.stringify(profile.default['serialList'])); window.history.pushState({}, "S4E", Code.addReplaceParamToUrl(window.location.search, "board", newBoard)); + //update serial speed list in serial monitor + document.getElementById('serialConnectSpeed_Menu').length = 0; + var serialConnectSpeedAvailable = profile.default['serialList']; + serialConnectSpeedAvailable.forEach((serialConnectSpeed) => { + var option = document.createElement('option'); + option.value = serialConnectSpeed; + option.text = serialConnectSpeed; + document.getElementById('serialConnectSpeed_Menu').appendChild(option); + }); // "reboot" elements document.getElementById('overlayForModals').style.display = "none"; document.getElementById('boardListModal').classList.remove('show'); @@ -78,34 +87,4 @@ Code.changeBoard = function() { var xml = Blockly.Xml.workspaceToDom(Code.mainWorkspace); Code.mainWorkspace.clear() Blockly.Xml.domToWorkspace(xml, Code.mainWorkspace); -}; - -/** - * Set COM port - */ -Code.setPort = function() { - var serialPortMenu = document.getElementById('serialMenu'); - var newPort = encodeURIComponent(serialPortMenu.options[serialPortMenu.selectedIndex].value); - document.getElementById('overlayForModals').style.display = "none"; - document.getElementById('portListModal').classList.remove('show'); - document.getElementById("portSelected_span").textContent = ' : ' + newPort; - if (newPort != 'none') { - document.getElementById('serialButton').classList.add('active'); - document.getElementById('serialButton').title = newPort; - document.getElementById('serialButton').onmouseover = function() { - document.getElementById("content_hoverButton").textContent = newPort; - }; - document.getElementById('serialButton').onmouseout = function() { - document.getElementById("content_hoverButton").textContent = ""; - } - } else { - document.getElementById('serialButton').classList.remove('active'); - document.getElementById('serialButton').title = MSG['serialButtonSpan']; - document.getElementById('serialButton').onmouseover = function() { - document.getElementById("content_hoverButton").textContent = MSG['serialButtonSpan']; - }; - document.getElementById('serialButton').onmouseout = function() { - document.getElementById("content_hoverButton").textContent = ""; - }; - } }; \ No newline at end of file diff --git a/index.html b/index.html index 1a015b9..dcbcdab 100644 --- a/index.html +++ b/index.html @@ -232,6 +232,7 @@ +