From afe5f867c83dd86c0810bbf924c6d0f78b163659 Mon Sep 17 00:00:00 2001 From: Christian Herzog Date: Fri, 27 Sep 2019 20:24:41 +0200 Subject: [PATCH 1/3] show FW date --- components/wifi-manager/code.js | 3 +++ components/wifi-manager/index.html | 1 + 2 files changed, 4 insertions(+) diff --git a/components/wifi-manager/code.js b/components/wifi-manager/code.js index f33069d1..0e1f8db8 100644 --- a/components/wifi-manager/code.js +++ b/components/wifi-manager/code.js @@ -259,10 +259,13 @@ $(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 $("#releaseTable").append( ""+ ""+ver+""+ ""+idf+""+ + ""+date+""+ ""+cfg+""+ ""+branch+""+ ""+ diff --git a/components/wifi-manager/index.html b/components/wifi-manager/index.html index d5394146..d8178142 100644 --- a/components/wifi-manager/index.html +++ b/components/wifi-manager/index.html @@ -209,6 +209,7 @@ Firmware version IDF version + Release date HW platform Branch Flash this FW From 4b1ac7015119f70e0177db63c12bc199b9ac8cac Mon Sep 17 00:00:00 2001 From: Christian Herzog Date: Fri, 27 Sep 2019 21:53:04 +0200 Subject: [PATCH 2/3] UI for GPIO pins --- components/wifi-manager/code.js | 22 +++++++++++- components/wifi-manager/index.html | 55 ++++++++++++++++++++++++++++++ components/wifi-manager/style.css | 6 ++++ 3 files changed, 82 insertions(+), 1 deletion(-) 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; From 2932b57aeabefc067d0c3319980dba2943910da5 Mon Sep 17 00:00:00 2001 From: Christian Herzog Date: Fri, 27 Sep 2019 22:47:07 +0200 Subject: [PATCH 3/3] show connection info in status bar --- components/wifi-manager/code.js | 2 ++ components/wifi-manager/index.html | 3 ++- components/wifi-manager/style.css | 11 +++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/components/wifi-manager/code.js b/components/wifi-manager/code.js index 2202674c..e2b8366a 100644 --- a/components/wifi-manager/code.js +++ b/components/wifi-manager/code.js @@ -419,6 +419,7 @@ function checkStatus(){ $("#netmask").text(data["netmask"]); $("#gw").text(data["gw"]); $("#wifi-status").slideDown( "fast", function() {}); + $(".footer").html("connected to SSID "+text(data["ssid"])+" with IP "+text(data["ip"])); //unlock the wait screen if needed $( "#ok-connect" ).prop("disabled",false); @@ -464,6 +465,7 @@ function checkStatus(){ $("#netmask").text(data["netmask"]); $("#gw").text(data["gw"]); $("#wifi-status").slideDown( "fast", function() {}); + $(".footer").html("connected to SSID "+data["ssid"]+" with IP "+data["ip"]); } enableAPTimer = false; if (!recovery) enableStatusTimer = false; diff --git a/components/wifi-manager/index.html b/components/wifi-manager/index.html index ba952534..602a9143 100644 --- a/components/wifi-manager/index.html +++ b/components/wifi-manager/index.html @@ -204,7 +204,7 @@ GPIO pin - + I2S @@ -303,5 +303,6 @@
+ diff --git a/components/wifi-manager/style.css b/components/wifi-manager/style.css index 34ef688d..75243cdd 100644 --- a/components/wifi-manager/style.css +++ b/components/wifi-manager/style.css @@ -1,6 +1,7 @@ body { border: 0; margin: 0; + margin-bottom:50px; } a { color: darkblue; @@ -305,3 +306,13 @@ input, textarea { #mode { float: right; } + +.footer { + position: fixed; + left: 0; + bottom: 0; + width: 100%; + background-color: #555; + color: white; + text-align: center; +}