Skip to content

Commit

Permalink
missed return after setting event buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
psy0rz committed Sep 3, 2017
1 parent e51c5d8 commit 190783f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/WebServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2826,6 +2826,7 @@ void handle_control() {
{
eventBuffer = webrequest.substring(6);
WebServer.send(200, "text/html", "OK");
return;
}

struct EventStruct TempEvent;
Expand Down Expand Up @@ -3317,7 +3318,7 @@ boolean handle_custom(String path) {
path = path.substring(1);
String reply = "";

if (path.startsWith(F("dashboard"))) // for the dashboard page, create a default unit dropdown selector
if (path.startsWith(F("dashboard"))) // for the dashboard page, create a default unit dropdown selector
{
reply += F("<script><!--\n"
"function dept_onchange(frmselect) {frmselect.submit();}"
Expand All @@ -3334,7 +3335,7 @@ boolean handle_custom(String path) {
char url[20];
sprintf_P(url, PSTR("http://%u.%u.%u.%u/dashboard.esp"), Nodes[unit].ip[0], Nodes[unit].ip[1], Nodes[unit].ip[2], Nodes[unit].ip[3]);
reply = F("<meta http-equiv=\"refresh\" content=\"0; URL=");
reply += url;
reply += url;
reply += F("\">");
WebServer.send(200, F("text/html"), reply);
return true;
Expand All @@ -3355,7 +3356,7 @@ boolean handle_custom(String path) {

addSelector_Item(reply, name, x, choice == x, false, F(""));
}
}
}
addSelector_Foot(reply);

// create <> navigation buttons
Expand All @@ -3365,7 +3366,7 @@ boolean handle_custom(String path) {
if (Nodes[x].ip[0] != 0) {prev = x; break;}
for (byte x = Settings.Unit+1; x < UNIT_MAX; x++)
if (Nodes[x].ip[0] != 0) {next = x; break;}

reply += F("<a class='button link' href=");
reply += path;
reply += F("?btnunit=");
Expand Down
2 changes: 1 addition & 1 deletion test/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
units=[
{
'type' : 'wemos d1 mini v2.2.0',
'port' : '/dev/serial/by-path/pci-0000:00:14.0-usb-0:3.4.4:1.0-port0',
'port' : '/dev/ttyUSB0',
'ip' : '192.168.13.91',
'flash_cmd' : 'esptool.py --port {port} -b 1500000 write_flash 0x0 .pioenvs/dev_4096/firmware.bin --flash_size=32m -p',
'build_cmd' : 'platformio run --environment dev_4096'
Expand Down

0 comments on commit 190783f

Please sign in to comment.