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

optimize boat data string handling

This commit is contained in:
wellenvogel
2021-12-12 11:47:56 +01:00
parent e08bcf1009
commit de04e5443b
4 changed files with 216 additions and 145 deletions

View File

@@ -14,6 +14,7 @@ class GwBoatItemBase{
uint8_t *buffer =NULL;
uint8_t *wp=NULL;
size_t bufferSize=0;
size_t baseOffset=0;
void ensure(size_t size);
public:
StringWriter();
@@ -21,6 +22,8 @@ class GwBoatItemBase{
size_t write(const uint8_t* s, size_t n);
const char * c_str() const;
int getSize() const;
void setBase();
bool baseFilled();
void reset();
};
static const unsigned long INVALID_TIME=60000;