diff --git a/data b/data index 59e2750..124c810 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 59e2750cf3bc53958f9714d0daf8d26b9d1b441f +Subproject commit 124c810e291a0c642da619f3c00109240c7a061a diff --git a/src/lib/config.cpp b/src/lib/config.cpp index 985d3a1..a6fdf86 100644 --- a/src/lib/config.cpp +++ b/src/lib/config.cpp @@ -746,7 +746,6 @@ void setupFrontlight() preferences.putBool("flFlashOnUpd", false); } - frontlightFadeInAll(preferences.getUInt("flEffectDelay"), true); } float getLightLevel() { diff --git a/src/lib/led_handler.cpp b/src/lib/led_handler.cpp index ca725ea..43e5182 100644 --- a/src/lib/led_handler.cpp +++ b/src/lib/led_handler.cpp @@ -159,19 +159,21 @@ void frontlightFadeOutAll(int flDelayTime, bool staggered) flInTransition = false; } -std::vector frontlightGetStatus() { +std::vector frontlightGetStatus() +{ std::vector statuses; for (int ledPin = 1; ledPin <= NUM_SCREENS; ledPin++) { uint16_t a = 0, b = 0; flArray.getPWM(ledPin, &a, &b); - statuses.push_back(round(b-a/4096)); + statuses.push_back(round(b - a / 4096)); } return statuses; } -bool frontlightIsOn() { +bool frontlightIsOn() +{ return frontlightOn; } @@ -223,6 +225,9 @@ void ledTask(void *parameter) switch (ledTaskParams) { case LED_POWER_TEST: +#ifdef HAS_FRONTLIGHT + frontlightFadeInAll(preferences.getUInt("flEffectDelay"), true); +#endif ledRainbow(20); pixels.clear(); break;