mirror of
https://github.com/me-no-dev/ESPAsyncWebServer.git
synced 2025-09-27 23:00:55 +02:00
Bugfix - my additions.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
/*.js.gz
|
||||
/edit.htm
|
||||
/*.gz
|
||||
/edit_gz
|
||||
/.exclude.files
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -204,8 +204,13 @@ void doOut(){
|
||||
if (ledOut != ledState){ // only if changed
|
||||
digitalWrite(ledPin, ledState); //consolidated here
|
||||
ledOut = ledState; //update
|
||||
if (ledState == LED_OFF) ws.textAll("led,ledoff");
|
||||
else ws.textAll("led,ledon");
|
||||
if (ledState == LED_OFF){
|
||||
ws.textAll("led,ledoff");
|
||||
Serial.println(F("LED-OFF"));
|
||||
} else {
|
||||
ws.textAll("led,ledon");
|
||||
Serial.println(F("LED-ON"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,7 +262,7 @@ void showTime()
|
||||
ledState = LED_ON;
|
||||
ws.textAll("led,ledon");
|
||||
}
|
||||
if ((((t - HYST) > ee.tempe)&&(ledState == LED_ON))||(!heat_enabled)){ // ON->OFF once, also turn off at end of period.
|
||||
if ((((t - HYST) > ee.tempe)&&(ledState == LED_ON))||(!heat_enabled)){ // ->OFF
|
||||
ledState = LED_OFF;
|
||||
ws.textAll("led,ledoff");
|
||||
}
|
||||
@@ -290,13 +295,6 @@ void checkPhysicalButton()
|
||||
if (digitalRead(btnPin) == LOW){
|
||||
if (btnState != LOW){ // btnState is used to avoid sequential toggles
|
||||
ledState = !ledState;
|
||||
if (ledState == LED_OFF){
|
||||
ws.textAll("led,ledoff");
|
||||
Serial.println(F("LED-OFF"));
|
||||
} else {
|
||||
ws.textAll("led,ledon");
|
||||
Serial.println(F("LED-ON"));
|
||||
}
|
||||
}
|
||||
btnState = LOW;
|
||||
} else {
|
||||
|
@@ -1,3 +1,3 @@
|
||||
/*.gz
|
||||
/edit.htm
|
||||
/edit_gz
|
||||
/.exclude.files
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,8 @@
|
||||
copy ..\src\edit.htm edit_src.htm
|
||||
call html-minifier-terser --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --minify-css true --minify-js true -o edit.htm edit_src.htm
|
||||
"C:\Program Files\7-Zip\7z.exe" a -tgzip -mx9 edit.htm.gz edit.htm
|
||||
copy edit.htm.gz ..\examples\SmartSwitch\data\edit.htm
|
||||
copy edit.htm.gz ..\examples\ESP_AsyncFSBrowser\data\edit.htm
|
||||
copy edit.htm.gz ..\examples\SmartSwitch\data\edit_gz
|
||||
copy edit.htm.gz ..\examples\ESP_AsyncFSBrowser\data\edit_gz
|
||||
ehg edit.htm.gz PROGMEM
|
||||
copy edit.htm.gz.h ..\src\edit.htm.gz.h
|
||||
pause
|
||||
|
@@ -237,7 +237,7 @@ void SPIFFSEditor::handleRequest(AsyncWebServerRequest *request){
|
||||
request->send(304);
|
||||
} else {
|
||||
#ifdef EDFS
|
||||
AsyncWebServerResponse *response = request->beginResponse(_fs, F("/edit.htm"), F("text/html"), false);
|
||||
AsyncWebServerResponse *response = request->beginResponse(_fs, F("/edit_gz"), F("text/html"), false);
|
||||
#else
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html"), edit_htm_gz, edit_htm_gz_len);
|
||||
#endif
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//File: edit.htm.gz, Size: 4503
|
||||
#define edit_htm_gz_len 4503
|
||||
const uint8_t edit_htm_gz[] PROGMEM = {
|
||||
0x1F,0x8B,0x08,0x08,0x89,0xFA,0x86,0x5F,0x02,0x00,0x65,0x64,0x69,0x74,0x2E,0x68,0x74,0x6D,0x00,0xB5,
|
||||
0x1F,0x8B,0x08,0x08,0xC5,0x2E,0x96,0x5F,0x02,0x00,0x65,0x64,0x69,0x74,0x2E,0x68,0x74,0x6D,0x00,0xB5,
|
||||
0x1A,0x0B,0x5B,0xDB,0x36,0xF0,0xAF,0x18,0x6F,0x63,0xF6,0xE2,0x38,0x0E,0x50,0xD6,0x3A,0x18,0x16,0x1E,
|
||||
0xEB,0xBB,0x50,0x12,0xDA,0xD1,0x8E,0xED,0x53,0x6C,0x25,0x56,0xB1,0x25,0xCF,0x96,0x09,0x34,0xCD,0x7F,
|
||||
0xDF,0x49,0xF2,0x93,0x84,0xEE,0xF1,0x6D,0xA5,0x60,0x49,0xA7,0x3B,0xDD,0x9D,0xEE,0x25,0xD9,0x7B,0x1B,
|
||||
|
Reference in New Issue
Block a user