mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-16 07:23:07 +01:00
Merge remote-tracking branch 'origin/sunset' into HEAD
This commit is contained in:
@@ -391,13 +391,18 @@ void OBP60Task(GwApi *api){
|
||||
setPortPin(OBP_FLASH_LED, true);
|
||||
}
|
||||
|
||||
// Back light with sun control
|
||||
// Back light with sun control: turn on if no valid data for safety reasons
|
||||
if(String(backlight) == "Control by Sun"){
|
||||
<<<<<<< HEAD
|
||||
if(time->valid == true && date->valid == true && lat->valid == true && lon->valid == true){
|
||||
setPortPin(OBP_BACKLIGHT_LED, commonData.data.sunControl);
|
||||
=======
|
||||
if(time->valid == false || date->valid == false || lat->valid == false || lon->valid == false){
|
||||
setPortPin(OBP_BACKLIGHT_LED, true);
|
||||
>>>>>>> sunset
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Check the keyboard message
|
||||
int keyboardMessage=0;
|
||||
while (xQueueReceive(allParameters.queue,&keyboardMessage,0)){
|
||||
@@ -454,10 +459,15 @@ void OBP60Task(GwApi *api){
|
||||
if(time->valid == true && date->valid == true && lat->valid == true && lon->valid == true){
|
||||
commonData.data = calcSunsetSunrise(time->value , date->value, lat->value, lon->value, tz.toDouble());
|
||||
// Backlight with sun control
|
||||
<<<<<<< HEAD
|
||||
if(String(backlight) == "Control by Sun"){
|
||||
if(time->valid == true && date->valid == true && lat->valid == true && lon->valid == true){
|
||||
setPortPin(OBP_BACKLIGHT_LED, commonData.data.sunControl);
|
||||
}
|
||||
=======
|
||||
if(String(backlight) == "Control by Sun"){
|
||||
setPortPin(OBP_BACKLIGHT_LED, commonData.data.sunDown);
|
||||
>>>>>>> sunset
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user