Fix for backlight control by sunshine
This commit is contained in:
parent
a5f257ec3e
commit
dc118a51e7
|
@ -464,7 +464,13 @@ void OBP60Task(GwApi *api){
|
||||||
commonData.sundata = calcSunsetSunrise(api, time->value , date->value, lat->value, lon->value, tz.toDouble());
|
commonData.sundata = calcSunsetSunrise(api, time->value , date->value, lat->value, lon->value, tz.toDouble());
|
||||||
// Backlight with sun control
|
// Backlight with sun control
|
||||||
if(String(backlight) == "Control by Sun"){
|
if(String(backlight) == "Control by Sun"){
|
||||||
setPortPin(OBP_BACKLIGHT_LED, commonData.sundata.sunDown);
|
if(commonData.sundata.sunDown == true){
|
||||||
|
setBacklightLED(brightness, color);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
setBacklightLED(brightness, CRGB::Black);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue