From 5978c0e71fb7a7acf74046192b33dc2ba5e1a72a Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Wed, 15 Jun 2022 20:16:37 +0200 Subject: [PATCH] Fixed issue in getValue --- lib/Hoymiles/src/inverters/InverterAbstract.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Hoymiles/src/inverters/InverterAbstract.cpp b/lib/Hoymiles/src/inverters/InverterAbstract.cpp index f9689f41..27107ed6 100644 --- a/lib/Hoymiles/src/inverters/InverterAbstract.cpp +++ b/lib/Hoymiles/src/inverters/InverterAbstract.cpp @@ -120,7 +120,6 @@ uint8_t InverterAbstract::getChannelCount() const byteAssign_t* b = getByteAssignment(); uint8_t cnt = 0; for (uint8_t pos = 0; pos < getAssignmentCount(); pos++) { - Serial.println(b[pos].ch); if (b[pos].ch > cnt) { cnt = b[pos].ch; } @@ -151,7 +150,7 @@ uint8_t InverterAbstract::getAssignIdxByChannelField(uint8_t channel, uint8_t fi float InverterAbstract::getValue(uint8_t channel, uint8_t fieldId) { uint8_t pos = getAssignIdxByChannelField(channel, fieldId); - if (pos = 0xff) { + if (pos == 0xff) { return 0; }