minimalmodbus icon indicating copy to clipboard operation
minimalmodbus copied to clipboard

feat: add ignoreslaveaddress parameter

Open penguintamer opened this issue 1 year ago • 1 comments

Allows bypassing slave address check for individual responses

closes #101

penguintamer avatar Apr 04 '24 04:04 penguintamer

To be honest, I don't like the idea of polluting every single function with this parameter.

Wouldn't it be better to implement this as a state of the instrument?

You can later set this parameter forever for universal addresses

instrument.ignore_slave_address = True

Or do one time exchanges

with instrument.expect_invalid_slave_address():
    instrument.write_register(..., NEW_ADDRESS)
    instrument.address = NEW_ADDRESS

j123b567 avatar Apr 04 '24 06:04 j123b567