improved update cycle process

pull/20/head
Boernsman 2021-04-21 21:45:05 +02:00 committed by Michael Zanetti
parent 739d1a4dd2
commit 205a4783dc
1 changed files with 1 additions and 0 deletions

View File

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