Normalized Wifi to WiFI.

Fixed button spacing on console clear and log reset buttons
Renamed cgiReboot method to cgiReset and called the proper reset method
Normalized whitespace in cgiflash.c
pull/72/head
Benjamin Runnels 9 years ago
parent ebda951769
commit 3eccd26e76
  1. 2
      esp-link/cgi.c
  2. 5
      esp-link/cgiflash.c
  3. 2
      esp-link/cgiflash.h
  4. 2
      esp-link/main.c
  5. 6
      html/console.html
  6. 10
      html/home.html
  7. 19
      html/log.html
  8. 2
      html/mqtt.html
  9. 2
      html/services.html
  10. 18
      html/wifi/wifi.html

@ -206,7 +206,7 @@ int ICACHE_FLASH_ATTR cgiMenu(HttpdConnData *connData) {
"{ "
"\"menu\": [ "
"\"Home\", \"/home.html\", "
"\"Wifi\", \"/wifi/wifi.html\", "
"\"WiFI\", \"/wifi/wifi.html\", "
"\"µC Console\", \"/console.html\", "
"\"Services\", \"/services.html\", "
#ifdef MQTT

@ -185,7 +185,7 @@ int ICACHE_FLASH_ATTR cgiRebootFirmware(HttpdConnData *connData) {
return HTTPD_CGI_DONE;
}
int ICACHE_FLASH_ATTR cgiReboot(HttpdConnData *connData) {
int ICACHE_FLASH_ATTR cgiReset(HttpdConnData *connData) {
if (connData->conn == NULL) return HTTPD_CGI_DONE; // Connection aborted. Clean up.
httpdStartResponse(connData, 200);
@ -193,9 +193,8 @@ int ICACHE_FLASH_ATTR cgiReboot(HttpdConnData *connData) {
httpdEndHeaders(connData);
// Schedule a reboot
system_upgrade_flag_set(UPGRADE_FLAG_FINISH);
os_timer_disarm(&flash_reboot_timer);
os_timer_setfn(&flash_reboot_timer, (os_timer_func_t *)system_upgrade_reboot, NULL);
os_timer_setfn(&flash_reboot_timer, (os_timer_func_t *)system_restart, NULL);
os_timer_arm(&flash_reboot_timer, 2000, 1);
return HTTPD_CGI_DONE;
}

@ -7,6 +7,6 @@ int cgiReadFlash(HttpdConnData *connData);
int cgiGetFirmwareNext(HttpdConnData *connData);
int cgiUploadFirmware(HttpdConnData *connData);
int cgiRebootFirmware(HttpdConnData *connData);
int cgiReboot(HttpdConnData *connData);
int cgiReset(HttpdConnData *connData);
#endif

@ -57,7 +57,7 @@ HttpdBuiltInUrl builtInUrls[] = {
{ "/pgm/upload", cgiOptibootData, NULL },
{ "/log/text", ajaxLog, NULL },
{ "/log/dbg", ajaxLogDbg, NULL },
{ "/log/reboot", cgiReboot, NULL },
{ "/log/reset", cgiReset, NULL },
{ "/console/reset", ajaxConsoleReset, NULL },
{ "/console/baud", ajaxConsoleBaud, NULL },
{ "/console/text", ajaxConsole, NULL },

@ -6,8 +6,8 @@
<div class="content flex-fill flex-vbox">
<p>
<a id="reset-button" class="pure-button button-primary" href="#">Reset &#xb5;C</a>
<a id="clear-button" class="pure-button button-primary" href="#">Clear Log</a>
&nbsp;&nbsp;Baud:
&nbsp; <a id="clear-button" class="pure-button button-primary" href="#">Clear Log</a>
&nbsp; Baud:
<select id="baud-sel" class="pure-button" href="#">
<option value="460800">460800</option>
<option value="250000">250000</option>
@ -18,7 +18,7 @@
<option value="19200">19200</option>
<option value="9600">9600</option>
</select>
&nbsp;&nbsp;Fmt: 8N1
&nbsp; Fmt: 8N1
</p>
<div class="pure-g">
<div class="pure-u-1-4"><legend><b>Console</b></legend></div>

@ -22,8 +22,8 @@
</div>
</td></tr>
<tr><td>Network SSID</td><td id="wifi-ssid"></td></tr>
<tr><td>Wifi status</td><td id="wifi-status"></td></tr>
<tr><td>Wifi address</td><td id="wifi-ip"></td></tr>
<tr><td>WiFI status</td><td id="wifi-status"></td></tr>
<tr><td>WiFI address</td><td id="wifi-ip"></td></tr>
<tr><td>SLIP status</td><td class="system-slip"></td></tr>
<tr><td>MQTT status</td><td class="system-mqtt"></td></tr>
<tr><td>Serial baud</td><td class="system-baud"></td></tr>
@ -32,7 +32,7 @@
<div class="card">
<h1>Info</h1>
<p style="margin-bottom:0;">The JeeLabs esp-link firmware bridges the ESP8266
serial port to Wifi and can
serial port to WiFI and can
program microcontrollers over the serial port, in particular Arduinos, AVRs, and
NXP's LPC800 and other ARM processors. Typical avrdude command line to
program an Arduino:</p>
@ -109,8 +109,8 @@
<h1>System details</h1>
<div id="system-spinner" class="spinner spinner-small"></div>
<table id="system-table" class="pure-table pure-table-horizontal" hidden><tbody>
<tr><td>WiFi mode</td><td id="wifi-mode"></td></tr>
<tr><td>Wifi channel</td><td id="wifi-chan"></td></tr>
<tr><td>WiFI mode</td><td id="wifi-mode"></td></tr>
<tr><td>WiFI channel</td><td id="wifi-chan"></td></tr>
<tr><td>Flash chip ID</td><td>
<div>
<span class="system-id"></span>

@ -7,12 +7,11 @@
<p>The debug log shows the most recent characters printed by the esp-link software itself to
its own debug log.</p>
<div class="pure-g">
<p class="pure-u-1-4">
<p class="pure-u-1-4" style="vertical-align: baseline;width:40%">
<a id="refresh-button" class="pure-button button-primary" href="#">Refresh</a>
<a id="reboot-button" class="pure-button button-primary" href="#">Reboot esp-link</a>
<a id="clear-button" class="pure-button button-primary" href="#">Clear Log</a>
&nbsp;<a id="reset-button" class="dbg-btn pure-button button-primary" href="#">Reset esp-link</a>
</p>
<p class="pure-u-3-4" style="vertical-align: baseline">
<p class="pure-u-3-4" style="vertical-align: baseline;width:60%">
UART debug log:
<a id="dbg-auto" class="dbg-btn pure-button" href="#">auto</a>
<a id="dbg-off" class="dbg-btn pure-button" href="#">off</a>
@ -36,22 +35,16 @@
fetchText(100, false);
});
$("#reboot-button").addEventListener("click", function (e) {
$("#reset-button").addEventListener("click", function (e) {
e.preventDefault();
var co = $("#console");
co.innerHTML = "";
ajaxSpin('POST', "/log/reboot",
function (resp) { showNotification("esp-link reset"); co.textEnd = 0; },
ajaxSpin('POST', "/log/reset",
function (resp) { showNotification("Resetting esp-link"); co.textEnd = 0; fetchText(2000, false); },
function (s, st) { showWarning("Error resetting esp-link"); }
);
});
$("#clear-button").addEventListener("click", function (e) {
e.preventDefault();
var co = $("#console");
co.innerHTML = "";
});
["auto", "off", "on0", "on1"].forEach(function(mode) {
bnd($('#dbg-'+mode), "click", function(el) {
ajaxJsonSpin('POST', "/log/dbg?mode="+mode,

@ -14,7 +14,7 @@
using parameters set below and stored in esp-link's flash settings. This allows
esp-link to take care of connection parameters and disconnect/reconnect operations.</p>
<p>The MQTT client also supports sending periodic status messages about esp-link itself,
including Wifi RSSI, and free heap memory.</p>
including WiFI RSSI, and free heap memory.</p>
<div class="form-horizontal">
<input type="checkbox" name="slip-enable"/>
<label>Enable SLIP on serial port</label>

@ -48,7 +48,7 @@
<div class="popup">Synology does a log rotate if timestamp is in the past so disable to prevent this</div>
</div>
<button id="Syslog-button" type="submit" class="pure-button button-primary">
Update syslog settings!
Update Syslog settings!
</button>
</form>
</div>

@ -1,27 +1,27 @@
<div id="main">
<div class="header">
<h1>Wifi Configuration</h1>
<h1>WiFi Configuration</h1>
</div>
<div class="content">
<div class="pure-g">
<div class="pure-u-1 pure-u-md-1-2"><div class="card">
<h1>Wifi State</h1>
<h1>WiFi State</h1>
<div id="wifi-spinner" class="spinner spinner-small"></div>
<table id="wifi-table" class="pure-table pure-table-horizontal" hidden><tbody>
<tr><td>WiFi mode</td><td id="wifi-mode"></td></tr>
<tr><td>Wifi channel</td><td id="wifi-chan"></td></tr>
<tr><td>WiFi channel</td><td id="wifi-chan"></td></tr>
<tr><td>Configured network</td><td id="wifi-ssid"></td></tr>
<tr><td>Wifi status</td><td id="wifi-status"></td></tr>
<tr><td>Wifi address</td><td id="wifi-ip"></td></tr>
<tr><td>Wifi rssi</td><td id="wifi-rssi"></td></tr>
<tr><td>Wifi phy</td><td id="wifi-phy"></td></tr>
<tr><td>Wifi MAC</td><td id="wifi-mac"></td></tr>
<tr><td>WiFi status</td><td id="wifi-status"></td></tr>
<tr><td>WiFi address</td><td id="wifi-ip"></td></tr>
<tr><td>WiFi rssi</td><td id="wifi-rssi"></td></tr>
<tr><td>WiFi phy</td><td id="wifi-phy"></td></tr>
<tr><td>WiFi MAC</td><td id="wifi-mac"></td></tr>
<tr><td colspan="2" id="wifi-warn"></td></tr>
</tbody> </table>
</div></div>
<div class="pure-u-1 pure-u-md-1-2"><div class="card">
<h1>Wifi Association</h1>
<h1>WiFi Association</h1>
<p id="reconnect" style="color: #600" hidden></p>
<form action="#" id="wifiform" class="pure-form pure-form-stacked">
<legend>To connect to a WiFi network, please select one of the detected networks,

Loading…
Cancel
Save