From 0dca85d67bedd98f61517e7b8f5c8bc3be9e899f Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Sat, 4 Jun 2022 10:28:23 +0200 Subject: [PATCH] Fixed currency conversion between nordic currencies --- src/entsoe/DnbCurrParser.cpp | 4 ++-- src/entsoe/DnbCurrParser.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/entsoe/DnbCurrParser.cpp b/src/entsoe/DnbCurrParser.cpp index 82fcf278..c85dfb44 100644 --- a/src/entsoe/DnbCurrParser.cpp +++ b/src/entsoe/DnbCurrParser.cpp @@ -1,6 +1,5 @@ #include "DnbCurrParser.h" #include "Arduino.h" -#include "HardwareSerial.h" float DnbCurrParser::getValue() { return value; @@ -30,13 +29,14 @@ size_t DnbCurrParser::write(const uint8_t *buffer, size_t size) { } size_t DnbCurrParser::write(uint8_t byte) { - if(pos >= 64) pos = 0; + if(pos >= 128) pos = 0; if(pos == 0) { if(byte == '<') { buf[pos++] = byte; } } else if(byte == '>') { buf[pos++] = byte; + buf[pos++] = '\0'; if(strncmp(buf, "