diff --git a/components/wifi-manager/code.js b/components/wifi-manager/code.js index 0e1f8db8..2202674c 100644 --- a/components/wifi-manager/code.js +++ b/components/wifi-manager/code.js @@ -206,6 +206,26 @@ $(document).ready(function(){ console.log('sent config JSON with headers:', autoexec1); }); + $("#save-gpio").on("click", function() { + var headers = {}; + $("input.gpio").each(function() { + var id = $(this)[0].id; + var pin = $(this).val(); + if (pin != '') { + headers[id] = pin; + } + }); + $.ajax({ + url: '/config.json', + dataType: 'json', + method: 'POST', + cache: false, + headers: JSON.stringify(headers), + data: { 'timestamp': Date.now() } + }); + console.log('sent config JSON with headers:', JSON.stringify(headers)); + }); + $("#flash").on("click", function() { var url = $("#fwurl").val(); $.ajax({ @@ -260,7 +280,7 @@ $(document).ready(function(){ var [ver, idf, cfg, branch] = release.name.split('#'); var body = release.body.replace(/\\n/ig, "
").replace(/\'/ig, "\""); var [date, time] = release.created_at.split('T'); - if (ver.match(/esp-idf/)) next; //TODO delete + if (ver.match(/esp-idf/)) return; //TODO delete $("#releaseTable").append( ""+ ""+ver+""+ diff --git a/components/wifi-manager/index.html b/components/wifi-manager/index.html index d8178142..ba952534 100644 --- a/components/wifi-manager/index.html +++ b/components/wifi-manager/index.html @@ -197,6 +197,61 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SignalGPIO pin
I2S
I2S Bit clock + +
I2S Word select + +
I2S Data + +
SPDIF
SPDIF Bit clock + +
SPDIF Word select + +
SPDIF Data + +
+
+ +
diff --git a/components/wifi-manager/style.css b/components/wifi-manager/style.css index 4c3f62a4..34ef688d 100644 --- a/components/wifi-manager/style.css +++ b/components/wifi-manager/style.css @@ -213,6 +213,12 @@ input[type='text'], input[type='password'], textarea { padding: 4px; } +input.gpio { + width: 2em; + color: #000; + height: 1.8em; +} + .custom-switch, .custom-radio { padding-left: 2.25rem; margin-left: 12px;