telnet works in AP mode, no more automatic web refresh

This commit is contained in:
Paul Derbyshire
2019-07-08 11:23:00 +02:00
parent 61e8f093de
commit 32b61f67cf
4 changed files with 9 additions and 14 deletions

View File

@@ -1972,7 +1972,7 @@ void MyESP::_webRootPage() {
char s[1000] = {0};
strlcpy(s, webCommonPage_start, sizeof(s));
strlcat(s, webCommonPage_start_refresh, sizeof(s));
// strlcat(s, webCommonPage_start_refresh, sizeof(s));
strlcat(s, webCommonPage_start_body, sizeof(s));
strlcat(s, "<h1>", sizeof(s));
@@ -2217,7 +2217,7 @@ void MyESP::loop() {
ArduinoOTA.handle(); // OTA
if (_ota_doing_update) {
return; // quit if in the middle of an update
return; // quit if in the middle of an OTA update
}
_calculateLoad();
@@ -2225,12 +2225,7 @@ void MyESP::loop() {
_heartbeatCheck();
_bootupSequence();
webServer.handleClient(); // web server client requests
// if we're in AP mode, use the web server, otherwise switch to telnet
if (!isAPmode()) {
_telnetHandle();
}
_telnetHandle();
_mqttConnect(); // MQTT
yield(); // ...and breath

View File

@@ -9,7 +9,7 @@
#ifndef MyEMS_h
#define MyEMS_h
#define MYESP_VERSION "1.1.21"
#define MYESP_VERSION "1.1.22"
#include <ArduinoJson.h>
#include <ArduinoOTA.h>
@@ -207,9 +207,6 @@ const char webCommonPage_start[] = "<html>"
"<style>input {font-size: 1.2em; width: 100%; max-width: 350px; display: block; margin: 5px auto; }"
"body {background-color: #FFA500;font: normal 18px Verdana, Arial, sans-serif;} </style>";
const char webCommonPage_start_refresh[] = "<meta http-equiv='refresh' content='30'>";
const char webCommonPage_start_body[] = "</head><body>";
const char webCommonPage_end[] = "</body></html>";