Merge develop into main (#377)

- Extract web server from `DevelopmentService` into a separate class: `HttpServer`
- Export more functions in `tt_init.cpp`
This commit is contained in:
Ken Van Hoeylandt
2025-10-16 18:59:23 +02:00
committed by GitHub
parent d8346998ce
commit 9c5a427a34
6 changed files with 191 additions and 160 deletions
@@ -65,14 +65,14 @@ class DevelopmentApp final : public App {
void updateViewState() {
if (!service->isEnabled()) {
lv_label_set_text(statusLabel, "Service disabled");
} else if (!service->isStarted()) {
} else if (service::wifi::getRadioState() != service::wifi::RadioState::ConnectionActive) {
lv_label_set_text(statusLabel, "Waiting for connection...");
} else { // enabled and started
} else { // enabled and connected to wifi
auto ip = service::wifi::getIp();
if (ip.empty()) {
lv_label_set_text(statusLabel, "Waiting for IP...");
} else {
const std::string status = std::string("Available at ") + ip;
const std::string status = std::format("Available at {}", ip);
lv_label_set_text(statusLabel, status.c_str());
}
}