fliphess / esp8266_p1meter

dsmr 4.2 P1 meter to mqtt using esp8266 nodemcu
GNU General Public License v3.0
69 stars 114 forks source link

new lines contain to many characters #11

Open jellevervloessem opened 3 years ago

jellevervloessem commented 3 years ago

New lines contain to many characters, being the characters of previous longer lines. therefor I moved the memset in the while loop so every line gets cleared after being read.

https://github.com/fliphess/esp8266_p1meter/blob/facbebe95e118e8b8658a5ccd59dcb59fe681e00/esp8266_p1meter.ino#L345

I edited this in my fork: https://github.com/jellevervloessem/esp8266_p1meter/blob/a90aae075a32996490c3d6374bd99bffcd4074da/esp8266_p1meter/esp8266_p1meter.ino#L482

Not sure, but I think this is also failing the CRC.