feat: prepare v1.16.07 firmware release
This commit is contained in:
1 parent
129e687c02
commit
ccce0c8d75
95 files changed
+5550
-278
No files matched your search
@@ -7,8 +7,9 @@
|
||||
#define USER_BTN_PRESSED LOW
|
||||
#endif
|
||||
|
||||
#ifdef WITH_MQTT_BRIDGE
|
||||
#ifdef ESP_PLATFORM
|
||||
#include <WiFi.h>
|
||||
#include <helpers/esp32/WebConfigServer.h>
|
||||
#endif
|
||||
|
||||
#define AUTO_OFF_MILLIS 20000 // 20 seconds
|
||||
@@ -97,6 +98,38 @@ void UITask::renderCurrScreen() {
|
||||
_display->setCursor((_display->width() - poffWidth) / 2, 48);
|
||||
_display->drawTextCentered(_display->width()/2, 48, poweroff_string);
|
||||
} else {
|
||||
#ifdef WITH_WEBCONFIG
|
||||
if (WebConfigServer::isRebootPending()) {
|
||||
_display->setTextSize(1);
|
||||
_display->setColor(DisplayDriver::GREEN);
|
||||
_display->setCursor(0, 14);
|
||||
_display->print("Config saved!");
|
||||
_display->setColor(DisplayDriver::LIGHT);
|
||||
_display->setCursor(0, 30);
|
||||
_display->print("Rebooting...");
|
||||
return;
|
||||
}
|
||||
char wc_ssid[33], wc_ip[16];
|
||||
if (WebConfigServer::getSetupInfo(wc_ssid, sizeof(wc_ssid), wc_ip, sizeof(wc_ip))) {
|
||||
_display->setTextSize(1);
|
||||
_display->setColor(DisplayDriver::GREEN);
|
||||
_display->setCursor(0, 0);
|
||||
_display->print("WebUI WiFi Setup");
|
||||
_display->setColor(DisplayDriver::LIGHT);
|
||||
_display->setCursor(0, 14);
|
||||
_display->print("Join WiFi:");
|
||||
_display->setColor(DisplayDriver::YELLOW);
|
||||
_display->setCursor(6, 24);
|
||||
_display->print(wc_ssid);
|
||||
_display->setColor(DisplayDriver::LIGHT);
|
||||
_display->setCursor(0, 40);
|
||||
_display->print("Then browse to:");
|
||||
_display->setColor(DisplayDriver::YELLOW);
|
||||
_display->setCursor(6, 50);
|
||||
_display->print(wc_ip);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
_display->setCursor(0, 0);
|
||||
_display->setTextSize(1);
|
||||
_display->setColor(DisplayDriver::GREEN);
|
||||
@@ -140,6 +173,21 @@ void UITask::loop() {
|
||||
_display->turnOn();
|
||||
Serial.println("Powering Off");
|
||||
_powering_off_at = millis() + POWEROFF_DELAY;
|
||||
#ifdef WITH_WEBCONFIG
|
||||
} else if (ev == BUTTON_EVENT_TRIPLE_CLICK) {
|
||||
// Single click wakes the display and long press powers off. Triple-click
|
||||
// was unused in the repeater UI, so use it for the persistent WebUI toggle.
|
||||
WebConfigServer::requestToggleFromButton();
|
||||
_display->turnOn();
|
||||
_auto_off = millis() + AUTO_OFF_MILLIS;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_WEBCONFIG
|
||||
if (WebConfigServer::getSetupInfo(nullptr, 0, nullptr, 0)) {
|
||||
if (!_display->isOn()) _display->turnOn();
|
||||
_auto_off = millis() + AUTO_OFF_MILLIS;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in new issue
Block a user