improved update cycle process

This commit is contained in:
Boernsman 2021-04-21 21:45:05 +02:00 committed by Michael Zanetti
parent 739d1a4dd2
commit 205a4783dc

View File

@ -151,6 +151,7 @@ void EnergyMeter::getRegister(ModbusRegisterType type, ModbusRegisterDescriptor
} }
} }
modbus_32_t value; modbus_32_t value;
value.u = 0;
if (reply->result().length() == 1) { if (reply->result().length() == 1) {
value.u = static_cast<float>(reply->result().at(0)); value.u = static_cast<float>(reply->result().at(0));
} else if (reply->result().length() == 2) { } else if (reply->result().length() == 2) {