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

Fix for GPS LED

This commit is contained in:
norbert-walter
2022-04-01 13:11:48 +02:00
parent b1296061e3
commit eaec09a29c
3 changed files with 79 additions and 76 deletions

View File

@@ -378,11 +378,11 @@ void OBP60Task(GwApi *api){
commonData.data.maxpage = numPages;
// If GPS fix then LED off (HDOP)
if(String(gpsFix) == "GPS Fix Lost" && hdop->valid == true && int(hdop->value) <= 50){
if(String(gpsFix) == "GPS Fix Lost" && date->valid == true){
setPortPin(OBP_FLASH_LED, false);
}
// Ifmissing GPS fix then LED on
if(String(gpsFix) == "GPS Fix Lost" && ((hdop->valid == true && int(hdop->value) > 50) || hdop->valid == false)){
if(String(gpsFix) == "GPS Fix Lost" && date->valid == false){
setPortPin(OBP_FLASH_LED, true);
}
@@ -469,7 +469,7 @@ void OBP60Task(GwApi *api){
display.fillRect(0, 0, GxEPD_WIDTH, GxEPD_HEIGHT, bgcolor); // Clear display
if (pages[pageNumber].description && pages[pageNumber].description->header){
//build some header and footer using commonData
displayHeader(commonData, hdop, date, time);
displayHeader(commonData, date, time);
}
// Call the particular page