1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-13 05:53:06 +01:00

Merge pull request #108 from thooge/master

Implement formatter for XTE (cross track error)
This commit is contained in:
Norbert Walter
2024-11-02 13:35:13 +01:00
committed by GitHub

View File

@@ -379,6 +379,19 @@ FormatedData formatValue(GwApi::BoatValue *value, CommonData &commondata){
}
}
//########################################################
else if (value->getFormat() == "formatXte"){
double xte = abs(value->value);
rawvalue = value->value;
if (xte >= 100) {
snprintf(buffer,bsize,"%3.0f",value->value);
} else if (xte >= 10) {
snprintf(buffer,bsize,"%3.1f",value->value);
} else {
snprintf(buffer,bsize,"%3.2f",value->value);
}
result.unit = "nm";
}
//########################################################
else if (value->getFormat() == "kelvinToC"){
double temp = 0;
if(usesimudata == false) {