|
|
@@ -68,13 +68,13 @@ void Treppe::start_animation() |
|
|
|
|
|
|
|
if (fsm_outputs.dimmrichtung == DR_AUFDIMMEN) |
|
|
|
{ |
|
|
|
start_pwm = idle_brightness; |
|
|
|
start_pwm = idle_bright_internal; |
|
|
|
ziel_pwm = active_brightness; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
start_pwm = active_brightness; |
|
|
|
ziel_pwm = idle_brightness; |
|
|
|
ziel_pwm = idle_bright_internal; |
|
|
|
} |
|
|
|
|
|
|
|
current_tick = 0; |
|
|
@@ -192,7 +192,7 @@ bool Treppe::check_ldr() |
|
|
|
active = 1; |
|
|
|
if (ldr > ldr_schwelle + LDR_HYS) |
|
|
|
active = 0; |
|
|
|
|
|
|
|
activate_idle_pwm(active); |
|
|
|
return active; |
|
|
|
} |
|
|
|
|
|
|
@@ -257,6 +257,17 @@ void Treppe::set_idle_pwm(uint16_t _idle_brightness) |
|
|
|
berechne_dimmer(); |
|
|
|
Serial.printf("Treppe: idle_brightness=%d\n", idle_brightness); |
|
|
|
} |
|
|
|
|
|
|
|
void Treppe::activate_idle_pwm(bool active){ |
|
|
|
static uint8_t former_active = 0; |
|
|
|
|
|
|
|
if(active != former_active && fsm_outputs.status == ST_RUHEZUSTAND){ |
|
|
|
idle_bright_internal = idle_brightness * active; |
|
|
|
// Dimming Function for all LEDS ? |
|
|
|
pwmController.setAllChannelsPWM(idle_bright_internal); |
|
|
|
former_active = active; |
|
|
|
} |
|
|
|
} |
|
|
|
void Treppe::set_active_pwm(uint16_t _active_brightness) |
|
|
|
{ |
|
|
|
active_brightness = _active_brightness; |