From 2da631710f57bc627be564895e624ff87a419bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Fri, 10 Dec 2021 20:58:51 +0100 Subject: [PATCH] Fix solar edge connection endiness --- sunspec/integrationpluginsunspec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sunspec/integrationpluginsunspec.cpp b/sunspec/integrationpluginsunspec.cpp index ba53d11..3d38565 100644 --- a/sunspec/integrationpluginsunspec.cpp +++ b/sunspec/integrationpluginsunspec.cpp @@ -556,11 +556,11 @@ void IntegrationPluginSunSpec::setupConnection(ThingSetupInfo *info) SunSpecConnection *connection = nullptr; if (thing->thingClassId() == solarEdgeConnectionThingClassId) { - connection = new SunSpecConnection(address, port, slaveId, this); - } else { // Note: for some reason, solar edge is using big endian register order instead // of little endian as specified in sunspec and even solar edge documentation connection = new SunSpecConnection(address, port, slaveId, SunSpecDataPoint::ByteOrderBigEndian, this); + } else { + connection = new SunSpecConnection(address, port, slaveId, this); } connection->setTimeout(configValue(sunSpecPluginTimeoutParamTypeId).toUInt()); connection->setNumberOfRetries(configValue(sunSpecPluginNumberOfRetriesParamTypeId).toUInt());