Skip to content

Commit

Permalink
Improve rev. B startup flow, webUI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbaars committed Jul 9, 2024
1 parent 4f4e37e commit 1d710ba
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data
1 change: 0 additions & 1 deletion src/lib/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,6 @@ void setupFrontlight()
preferences.putBool("flFlashOnUpd", false);
}

frontlightFadeInAll(preferences.getUInt("flEffectDelay"), true);
}

float getLightLevel() {
Expand Down
11 changes: 8 additions & 3 deletions src/lib/led_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,19 +159,21 @@ void frontlightFadeOutAll(int flDelayTime, bool staggered)
flInTransition = false;
}

std::vector<uint16_t> frontlightGetStatus() {
std::vector<uint16_t> frontlightGetStatus()
{
std::vector<uint16_t> 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;
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1d710ba

Please sign in to comment.