Compare commits
No commits in common. "f62a18fe66bda45fe3f3ad4ae3d68be5769ece00" and "630250da7823ee2cff3917a8410bae13792dd303" have entirely different histories.
f62a18fe66
...
630250da78
@ -238,7 +238,7 @@ void Treppe::setup()
|
|||||||
pwmController.init(PCA9685_PhaseBalancer_None);
|
pwmController.init(PCA9685_PhaseBalancer_None);
|
||||||
//pwmController.init(PCA9685_PhaseBalancer_Linear);
|
//pwmController.init(PCA9685_PhaseBalancer_Linear);
|
||||||
pwmController.setPWMFrequency(100);
|
pwmController.setPWMFrequency(100);
|
||||||
//pwmController.setAllChannelsPWM(idle_brightness);
|
pwmController.setAllChannelsPWM(idle_brightness);
|
||||||
|
|
||||||
pinMode(A0, INPUT);
|
pinMode(A0, INPUT);
|
||||||
pinMode(SENSOR_OBEN, INPUT);
|
pinMode(SENSOR_OBEN, INPUT);
|
||||||
@ -259,19 +259,14 @@ void Treppe::set_idle_pwm(uint16_t _idle_brightness)
|
|||||||
Serial.printf("Treppe: idle_brightness=%d\n", idle_brightness);
|
Serial.printf("Treppe: idle_brightness=%d\n", idle_brightness);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Treppe::activate_idle_pwm(bool active)
|
void Treppe::activate_idle_pwm(bool active){
|
||||||
{
|
|
||||||
static uint8_t former_active = 0;
|
static uint8_t former_active = 0;
|
||||||
|
|
||||||
if (fsm_outputs.status == ST_RUHEZUSTAND || fsm_outputs.status == ST_INAKTIV_LDR)
|
if(active != former_active && fsm_outputs.status == ST_RUHEZUSTAND){
|
||||||
{
|
idle_bright_internal = idle_brightness * active;
|
||||||
if (active != former_active)
|
// Dimming Function for all LEDS ?
|
||||||
{
|
pwmController.setAllChannelsPWM(idle_bright_internal);
|
||||||
idle_bright_internal = idle_brightness * active;
|
former_active = active;
|
||||||
// Dimming Function for all LEDS ?
|
|
||||||
pwmController.setAllChannelsPWM(idle_bright_internal);
|
|
||||||
former_active = active;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void Treppe::set_active_pwm(uint16_t _active_brightness)
|
void Treppe::set_active_pwm(uint16_t _active_brightness)
|
||||||
|
@ -18,8 +18,6 @@ private:
|
|||||||
const uint8_t stufen;
|
const uint8_t stufen;
|
||||||
uint16_t time_per_stair = 300; // dimmtime per stair [ms]
|
uint16_t time_per_stair = 300; // dimmtime per stair [ms]
|
||||||
uint16_t idle_brightness = 400;
|
uint16_t idle_brightness = 400;
|
||||||
uint16_t idle_bright_internal = 0;
|
|
||||||
|
|
||||||
uint16_t active_brightness = 700;
|
uint16_t active_brightness = 700;
|
||||||
|
|
||||||
uint16_t ldr_schwelle = 7; // activation value for FSM [lx]
|
uint16_t ldr_schwelle = 7; // activation value for FSM [lx]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user