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:
@@ -216,6 +216,8 @@ void registerAllPages(PageList &list){
|
||||
list.add(®isterPageApparentWind);
|
||||
extern PageDescription registerPageWindRose;
|
||||
list.add(®isterPageWindRose);
|
||||
extern PageDescription registerPageWindRoseFlex;
|
||||
list.add(®isterPageWindRoseFlex); //
|
||||
extern PageDescription registerPageVoltage;
|
||||
list.add(®isterPageVoltage);
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user