mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-21 01:33:06 +01:00
Fix for backlight control by sunshine
This commit is contained in:
@@ -463,8 +463,14 @@ void OBP60Task(GwApi *api){
|
|||||||
// Provide sundata to all pages
|
// Provide sundata to all pages
|
||||||
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user