mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2026-09-11 19:55:14 +02:00
Fix failing initialization of AWD history buffer
This commit is contained in:
@@ -120,6 +120,12 @@ private:
|
|||||||
static constexpr double DBL_MAX = std::numeric_limits<double>::max();
|
static constexpr double DBL_MAX = std::numeric_limits<double>::max();
|
||||||
GwLog* logger;
|
GwLog* logger;
|
||||||
|
|
||||||
|
// specify missing data for boat value type AWD; AWD is not available in core gateway and need to be specified here
|
||||||
|
void defineAWD() {
|
||||||
|
awdBVal->setFormat("formatCourse");
|
||||||
|
awdBVal->valid = false;
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WindUtils(BoatValueList* boatValues, GwLog* log)
|
WindUtils(BoatValueList* boatValues, GwLog* log)
|
||||||
: logger(log)
|
: logger(log)
|
||||||
@@ -130,13 +136,15 @@ public:
|
|||||||
twdBVal = boatValues->findValueOrCreate("TWD");
|
twdBVal = boatValues->findValueOrCreate("TWD");
|
||||||
awaBVal = boatValues->findValueOrCreate("AWA");
|
awaBVal = boatValues->findValueOrCreate("AWA");
|
||||||
awsBVal = boatValues->findValueOrCreate("AWS");
|
awsBVal = boatValues->findValueOrCreate("AWS");
|
||||||
awdBVal = boatValues->findValueOrCreate("AWD");
|
|
||||||
cogBVal = boatValues->findValueOrCreate("COG");
|
cogBVal = boatValues->findValueOrCreate("COG");
|
||||||
stwBVal = boatValues->findValueOrCreate("STW");
|
stwBVal = boatValues->findValueOrCreate("STW");
|
||||||
sogBVal = boatValues->findValueOrCreate("SOG");
|
sogBVal = boatValues->findValueOrCreate("SOG");
|
||||||
hdtBVal = boatValues->findValueOrCreate("HDT");
|
hdtBVal = boatValues->findValueOrCreate("HDT");
|
||||||
hdmBVal = boatValues->findValueOrCreate("HDM");
|
hdmBVal = boatValues->findValueOrCreate("HDM");
|
||||||
varBVal = boatValues->findValueOrCreate("VAR");
|
varBVal = boatValues->findValueOrCreate("VAR");
|
||||||
|
|
||||||
|
awdBVal = boatValues->findValueOrCreate("AWD");
|
||||||
|
defineAWD();
|
||||||
};
|
};
|
||||||
|
|
||||||
static double to2PI(double a);
|
static double to2PI(double a);
|
||||||
|
|||||||
@@ -851,7 +851,7 @@ void OBP60Task(GwApi *api){
|
|||||||
|
|
||||||
// ulong startHandl = millis();
|
// ulong startHandl = millis();
|
||||||
trueWind.handleWinds(calcTrueWnds); // calculate true wind data from apparent wind values
|
trueWind.handleWinds(calcTrueWnds); // calculate true wind data from apparent wind values
|
||||||
trueWind.setMaxWs(); // maintain MaxTWS value in any case; invalid TWS value is considered automatically
|
trueWind.setMaxWs(); // maintain MaxTWS value in any case; invalid TWS value is considered automatically; MaxAWS is provided by core gateway if AWS is available
|
||||||
calibrationDataList.handleCalibration(&boatValues); // Process calibration for all boat data in <calibrationDataList>
|
calibrationDataList.handleCalibration(&boatValues); // Process calibration for all boat data in <calibrationDataList>
|
||||||
hstryBufferList.handleHstryBufs(useSimuData, commonData); // Handle history buffers for certain boat data for charts and other usage
|
hstryBufferList.handleHstryBufs(useSimuData, commonData); // Handle history buffers for certain boat data for charts and other usage
|
||||||
// LOG_DEBUG(GwLog::DEBUG, "obp60task: data handling: %d ms", millis() - startHandl);
|
// LOG_DEBUG(GwLog::DEBUG, "obp60task: data handling: %d ms", millis() - startHandl);
|
||||||
|
|||||||
Reference in New Issue
Block a user