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

#103: using formatters

This commit is contained in:
free-x
2025-02-25 18:54:00 +01:00
parent d0256fd37c
commit 6a2c623ea0
3 changed files with 10 additions and 4 deletions

View File

@@ -537,7 +537,7 @@ private:
return;
if (!NMEA0183Msg.AddStrField((WindAngle >= 0 && WindAngle <= 180) ? 'R' : 'L'))
return;
if (!NMEA0183Msg.AddDoubleField(WindSpeed * 3600.0/1852.0))
if (!NMEA0183Msg.AddDoubleField(formatKnots(WindSpeed)))
return;
if (!NMEA0183Msg.AddStrField("N"))
return;
@@ -545,7 +545,7 @@ private:
return;
if (!NMEA0183Msg.AddStrField("M"))
return;
if (!NMEA0183Msg.AddDoubleField(WindSpeed * 3600.0/1000.0))
if (!NMEA0183Msg.AddDoubleField(formatKmh(WindSpeed)))
return;
if (!NMEA0183Msg.AddStrField("K"))
return;