mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 17:29:50 +03:00
modbus publish emsesp-INT8 as modbus-int16, fix #2294
This commit is contained in:
@@ -2063,7 +2063,7 @@ int EMSdevice::get_modbus_value(uint8_t tag, const std::string & shortname, std:
|
||||
else if (dv.type == DeviceValueType::INT8) {
|
||||
if (result.size() != 1)
|
||||
return -8;
|
||||
result[0] = (uint16_t)(uint8_t)(*(int8_t *)(dv.value_p));
|
||||
result[0] = (uint16_t)(int16_t)(*(int8_t *)(dv.value_p));
|
||||
} else if (dv.type == DeviceValueType::UINT8) {
|
||||
if (result.size() != 1)
|
||||
return -9;
|
||||
|
||||
Reference in New Issue
Block a user