1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-16 07:23:07 +01:00

restore platformio.ini and implement logger function

This commit is contained in:
norbert-walter
2022-04-02 17:45:43 +02:00
parent b9aab54279
commit 78a71169a8
5 changed files with 37 additions and 44 deletions

View File

@@ -390,19 +390,7 @@ void OBP60Task(GwApi *api){
if(String(gpsFix) == "GPS Fix Lost" && date->valid == false){
setPortPin(OBP_FLASH_LED, true);
}
// 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)){
@@ -457,17 +445,10 @@ void OBP60Task(GwApi *api){
if(millis() > starttime5 + 1000){
starttime5 = millis();
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());
commonData.data = calcSunsetSunrise(api, 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
}
}
}