mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
fix modbus sending FP32_R values (#4882)
This commit is contained in:
parent
7d2ae4e252
commit
6e414180e0
1 changed files with 1 additions and 1 deletions
|
@ -506,12 +506,12 @@ void number_to_payload(std::vector<uint16_t> &data, int64_t value, SensorValueTy
|
|||
case SensorValueType::U_DWORD:
|
||||
case SensorValueType::S_DWORD:
|
||||
case SensorValueType::FP32:
|
||||
case SensorValueType::FP32_R:
|
||||
data.push_back((value & 0xFFFF0000) >> 16);
|
||||
data.push_back(value & 0xFFFF);
|
||||
break;
|
||||
case SensorValueType::U_DWORD_R:
|
||||
case SensorValueType::S_DWORD_R:
|
||||
case SensorValueType::FP32_R:
|
||||
data.push_back(value & 0xFFFF);
|
||||
data.push_back((value & 0xFFFF0000) >> 16);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue