forked from btclock/btclock_v3
Fix frontlight
This commit is contained in:
parent
82e80f66e2
commit
32e40e2cb7
3 changed files with 20 additions and 18 deletions
|
@ -338,11 +338,11 @@ void ledTheaterChaseRainbow(int wait) {
|
|||
Adafruit_NeoPixel getPixels() { return pixels; }
|
||||
|
||||
#ifdef HAS_FRONTLIGHT
|
||||
int flDelayTime = 10;
|
||||
int flDelayTime = 5;
|
||||
|
||||
void frontlightFadeInAll() {
|
||||
for (int dutyCycle = 0; dutyCycle <= preferences.getUInt("flMaxBrightness"); dutyCycle += 5) {
|
||||
for (int ledPin = 0; ledPin < NUM_SCREENS; ledPin++) {
|
||||
for (int ledPin = 0; ledPin <= NUM_SCREENS; ledPin++) {
|
||||
flArray.setPWM(ledPin, 0, dutyCycle);
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(flDelayTime));
|
||||
|
@ -351,11 +351,13 @@ void frontlightFadeInAll() {
|
|||
|
||||
void frontlightFadeOutAll() {
|
||||
for (int dutyCycle = preferences.getUInt("flMaxBrightness"); dutyCycle >= 0; dutyCycle -= 5) {
|
||||
for (int ledPin = 0; ledPin < NUM_SCREENS; ledPin++) {
|
||||
for (int ledPin = 0; ledPin <= NUM_SCREENS; ledPin++) {
|
||||
flArray.setPWM(ledPin, 0, dutyCycle);
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(flDelayTime));
|
||||
}
|
||||
|
||||
flArray.allOFF();
|
||||
}
|
||||
|
||||
void frontlightFadeIn(uint num) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue