mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-03-10 04:45:12 +00:00
Some changes to make it compile for both ESP8266 and ESP32
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -6,4 +6,5 @@
|
||||
*.sw[op]
|
||||
.vscode
|
||||
.pio
|
||||
platformio-user.ini
|
||||
platformio-user.ini
|
||||
src/version.h
|
||||
@@ -107,7 +107,7 @@ void HanConfigAp::handleRoot() {
|
||||
configuration *config = new configuration();
|
||||
config->load();
|
||||
|
||||
String html = CONFIG_HTML;
|
||||
String html = String((const __FlashStringHelper*) CONFIG_HTML);
|
||||
|
||||
if(config->hasConfig()) {
|
||||
bool access = !config->isAuth();
|
||||
@@ -201,10 +201,12 @@ void HanConfigAp::handleRoot() {
|
||||
void HanConfigAp::handleStyle() {
|
||||
println("Serving /style.css over http...");
|
||||
|
||||
String css = String((const __FlashStringHelper*) STYLE_CSS);
|
||||
|
||||
server.sendHeader("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||
server.sendHeader("Pragma", "no-cache");
|
||||
server.sendHeader("Expires", "-1");
|
||||
server.send(200, "text/html", STYLE_CSS, sizeof(STYLE_CSS));
|
||||
server.send(200, "text/css", css);
|
||||
}
|
||||
|
||||
void HanConfigAp::handleSave() {
|
||||
|
||||
@@ -3,7 +3,7 @@ extra_configs = platformio-user.ini
|
||||
|
||||
[common]
|
||||
framework = arduino
|
||||
lib_deps = HanConfigAp@1.0.0, HanReader@1.0.0, HanToJson@1.0.0, ArduinoJson@^6.0.0, MQTT@^2.4.0, DallasTemperature@^3.8.0, Base64@0.0.1
|
||||
lib_deps = HanConfigAp@1.0.0, HanReader@1.0.0, HanToJson@1.0.0, ArduinoJson@^6.0.0, MQTT@^2.4.0, DallasTemperature@^3.8.0
|
||||
|
||||
[env:esp12e]
|
||||
platform = espressif8266
|
||||
|
||||
Reference in New Issue
Block a user