Fix failing initialization of AWD history buffer

This commit is contained in:
Ulrich Meine
2026-07-12 00:39:54 +02:00
parent e129b18057
commit 807e4cec30
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -120,6 +120,12 @@ private:
static constexpr double DBL_MAX = std::numeric_limits<double>::max();
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:
WindUtils(BoatValueList* boatValues, GwLog* log)
: logger(log)
@@ -130,13 +136,15 @@ public:
twdBVal = boatValues->findValueOrCreate("TWD");
awaBVal = boatValues->findValueOrCreate("AWA");
awsBVal = boatValues->findValueOrCreate("AWS");
awdBVal = boatValues->findValueOrCreate("AWD");
cogBVal = boatValues->findValueOrCreate("COG");
stwBVal = boatValues->findValueOrCreate("STW");
sogBVal = boatValues->findValueOrCreate("SOG");
hdtBVal = boatValues->findValueOrCreate("HDT");
hdmBVal = boatValues->findValueOrCreate("HDM");
varBVal = boatValues->findValueOrCreate("VAR");
awdBVal = boatValues->findValueOrCreate("AWD");
defineAWD();
};
static double to2PI(double a);
+1 -1
View File
@@ -851,7 +851,7 @@ void OBP60Task(GwApi *api){
// ulong startHandl = millis();
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>
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);