You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
slimmeMeter.loop();
.
.
.
if (slimmeMeter.available()) {
Debugf("read telegram [%d]\r\n", ++telegramCount);
if (slimmeMeter.parse(&DSMRdata, &DSMRerror)) { // Parse succesful, print result
processData();
if (Verbose1) {
DSMRdata.applyEach(showValues());
printData();
}
} else { // Parser error, print error
Debugf("Parse error %s\r\n", DSMRerror.c_str());
telegramErrors++;
}
slimmeMeter.clear(); // reset DSMRdata ???
} // if (slimmeMeter.available())
DSMRdata and DSMRerror are declaired globaly:
// Set up to read from the Serial port, and use VCC_ENABLE as the
// request pin.
#ifdef VCC_ENABLE
P1Reader slimmeMeter(&Serial, VCC_ENABLE);
#else
P1Reader slimmeMeter(&Serial, 0);
#endif
MyData DSMRdata;
String DSMRerror;
but, after processing the first telegram, I keep getting this error for every next telegram:
Parse error XMX5LGBBLB2410065887
^
Duplicate field
I was under the impression that slimmeMeter.clear() would clear (empty) the DSMRdata area .. but it seems not to.
Can/will you please elaborate how to clear DSMRdata in my setup (I need DSMRdata to be globally declared to fix/find some heap problems).
The text was updated successfully, but these errors were encountered:
Dear Matthijs,
I have this piece of code:
DSMRdata and DSMRerror are declaired globaly:
but, after processing the first telegram, I keep getting this error for every next telegram:
I was under the impression that
slimmeMeter.clear()
would clear (empty) the DSMRdata area .. but it seems not to.Can/will you please elaborate how to clear DSMRdata in my setup (I need DSMRdata to be globally declared to fix/find some heap problems).
The text was updated successfully, but these errors were encountered: