Skip to content

Commit eb3475b

Browse files
committed
Make MO_CONFIG_MAX_VALSTRSIZE override-able via -D
Wrap the existing 128-byte default in #ifndef so consumers can raise the ceiling via a build flag (`-DMO_CONFIG_MAX_VALSTRSIZE=256` etc.) without patching the header. Default is unchanged. Same shape as the surrounding MO_CONFIG_EXT_PREFIX / MO_CONFIG_TYPECHECK guards. Motivation: the OCPP 1.6 MeterValuesSampledData advertised list overflows 128 chars once the optional measurands (Temperature, SoC, Frequency, Power.Factor) are bound — Configuration::setString silently rejects the write and the CSMS-side default permanently overrides ours.
1 parent ee1271b commit eb3475b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/MicroOcpp/Core/ConfigurationKeyValue.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
#include <ArduinoJson.h>
99
#include <memory>
1010

11+
#ifndef MO_CONFIG_MAX_VALSTRSIZE
1112
#define MO_CONFIG_MAX_VALSTRSIZE 128
13+
#endif
1214

1315
#ifndef MO_CONFIG_EXT_PREFIX
1416
#define MO_CONFIG_EXT_PREFIX "Cst_"

0 commit comments

Comments
 (0)