I wanted to use modbus-cli to talk to an air conditioner type system with an Enecon control board, but it doesn't support function 16 to write multiple registers. So this change makes modbus-cli use function 6 if only one register write is requested. Any attempt to write multiple registers still uses the multiple write call (16).
use modbus function 6, write_single_register, if only one write requested
use modbus function 16, write_multiple_registers, for multiple writes
I wanted to use modbus-cli to talk to an air conditioner type system with an Enecon control board, but it doesn't support function 16 to write multiple registers. So this change makes modbus-cli use function 6 if only one register write is requested. Any attempt to write multiple registers still uses the multiple write call (16).
write_single_register
, if only one write requestedwrite_multiple_registers
, for multiple writes