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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user