[modbus] Share helper functions across modbus components - part B (#14172)
Co-authored-by: J. Nick Koston <nick+github@koston.org> Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
9 files changed
+277
-222
No files matched your search
@@ -34,7 +34,7 @@ void ModbusFloatOutput::write_state(float value) {
|
||||
}
|
||||
// lambda didn't set payload
|
||||
if (data.empty()) {
|
||||
data = float_to_payload(value, this->sensor_value_type);
|
||||
data = modbus::helpers::float_to_payload(value, this->sensor_value_type);
|
||||
}
|
||||
|
||||
ESP_LOGD(TAG, "Updating register: start address=0x%X register count=%d new value=%.02f (val=%.02f)",
|
||||
|
||||
Reference in new issue
Block a user