Skip to content

Commit eb84cfe

Browse files
authored
Solve ModbusDeviceContext bug. (#2653)
1 parent 28eb319 commit eb84cfe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pymodbus/datastore/context.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ def __init__(self, *_args,
9393
"""Initialize the datastores."""
9494
self.store = {}
9595
self.store["d"] = di if di is not None else ModbusSequentialDataBlock.create()
96-
self.store["c"] = co if di is not None else ModbusSequentialDataBlock.create()
97-
self.store["i"] = ir if di is not None else ModbusSequentialDataBlock.create()
98-
self.store["h"] = hr if di is not None else ModbusSequentialDataBlock.create()
96+
self.store["c"] = co if co is not None else ModbusSequentialDataBlock.create()
97+
self.store["i"] = ir if ir is not None else ModbusSequentialDataBlock.create()
98+
self.store["h"] = hr if hr is not None else ModbusSequentialDataBlock.create()
9999

100100
def __str__(self):
101101
"""Return a string representation of the context.

0 commit comments

Comments
 (0)