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

Merge branch 'master' into autobahn

This commit is contained in:
thooge
2024-11-02 18:44:46 +01:00
committed by GitHub
8 changed files with 782 additions and 74 deletions

View File

@@ -216,6 +216,8 @@ void registerAllPages(PageList &list){
list.add(&registerPageApparentWind);
extern PageDescription registerPageWindRose;
list.add(&registerPageWindRose);
extern PageDescription registerPageWindRoseFlex;
list.add(&registerPageWindRoseFlex); //
extern PageDescription registerPageVoltage;
list.add(&registerPageVoltage);
extern PageDescription registerPageDST810;
@@ -289,6 +291,8 @@ void underVoltageDetection(GwApi *api){
// OBP60 Task
//####################################################################################
void OBP60Task(GwApi *api){
// vTaskDelete(NULL);
// return;
GwLog *logger=api->getLogger();
GwConfigHandler *config=api->getConfig();
startLedTask(api);
@@ -430,6 +434,7 @@ void OBP60Task(GwApi *api){
uint brightness = 2.55 * uint(api->getConfig()->getConfigItem(api->getConfig()->blBrightness,true)->asInt());
bool uvoltage = api->getConfig()->getConfigItem(api->getConfig()->underVoltage,true)->asBoolean();
String cpuspeed = api->getConfig()->getConfigItem(api->getConfig()->cpuSpeed,true)->asString();
uint hdopAccuracy = uint(api->getConfig()->getConfigItem(api->getConfig()->hdopAccuracy,true)->asInt());
// refreshmode defined in init section
// displaycolor defined in init section
@@ -496,11 +501,11 @@ void OBP60Task(GwApi *api){
commonData.data.maxpage = numPages;
// If GPS fix then LED off (HDOP)
if(String(gpsFix) == "GPS Fix Lost" && date->valid == true){
if(String(gpsFix) == "GPS Fix Lost" && hdop->value <= hdopAccuracy && hdop->valid == true){
setFlashLED(false);
}
// If missing GPS fix then LED on
if(String(gpsFix) == "GPS Fix Lost" && date->valid == false){
if((String(gpsFix) == "GPS Fix Lost" && hdop->value > hdopAccuracy && hdop->valid == true) || (String(gpsFix) == "GPS Fix Lost" && hdop->valid == false)){
setFlashLED(true);
}