modbus mask==3 : incremented value + swap, 4: no increment and swap

This commit is contained in:
2021-05-07 23:16:07 +03:00
parent f241bc0c77
commit d219a594c5

View File

@@ -1521,7 +1521,9 @@ int Item::modbusDimmerSet(int addr, uint16_t _reg, int _regType, int _mask, uint
break;
case 2:
break;
case 3: //Swap high and low bytes
case 3:
value++;
case 4: //Swap high and low bytes
t = (value & 0xff00) >> 8;
value <<=8;
value |= t;