1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2026-03-28 18:06:37 +01:00

Move formatValue to formatter class

This commit is contained in:
2025-08-21 12:34:17 +02:00
parent fbe6c1a9a5
commit cba21574cb
20 changed files with 161 additions and 171 deletions

View File

@@ -96,8 +96,6 @@ typedef struct {
} FormattedData;
// Formatter for boat values
FormattedData formatValue(GwApi::BoatValue *value, CommonData &commondata);
class Formatter {
private:
String stimeZone = "0";
@@ -109,9 +107,15 @@ private:
String tempFormat = "C"; // [K|°C|°F]
String dateFormat = "ISO"; // [DE|GB|US|ISO]
bool usesimudata = false; // [on|off]
String precision = "2"; // [1|2]
const char* fmt_dec_1;
const char* fmt_dec_10;
const char* fmt_dec_100;
public:
Formatter(GwConfigHandler *config);
FormattedData formatValue(GwApi::BoatValue *value, CommonData &commondata);
};
// Standard format functions without overhead