improved update cycle process
This commit is contained in:
parent
739d1a4dd2
commit
205a4783dc
@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user