fix: single boot refresh with QR code, async WiFi scan, skip light sleep in AP mode
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
10
src/main.cpp
10
src/main.cpp
@@ -199,19 +199,19 @@ void setup() {
|
||||
webServer.begin(settingsManager, immichClient, powerManager, wifiManager);
|
||||
webServer.setActionCallback(webActionCallback);
|
||||
|
||||
// Single display update after all init is complete
|
||||
if (wifiManager.isAPMode()) {
|
||||
displayManager.showMessage("Setup Required",
|
||||
"Connect to PaperColor-Setup WiFi");
|
||||
displayManager.showSetupScreen();
|
||||
} else {
|
||||
displayManager.showMessage("Immich Frame", "Loading photos...");
|
||||
|
||||
// Create display task on Core 1
|
||||
xTaskCreatePinnedToCore(displayTask, "display", 32768, nullptr, 1,
|
||||
&displayTaskHandle, 1);
|
||||
}
|
||||
|
||||
// Enable light sleep for power saving
|
||||
powerManager.enableLightSleep();
|
||||
// Enable light sleep only in station mode (not supported in AP mode)
|
||||
powerManager.enableLightSleep();
|
||||
}
|
||||
|
||||
Serial.println("[main] Boot complete");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user