test + fix
This commit is contained in:
1 parent
e5f690ef3b
commit
cc755b3003
1 file changed
+5
@@ -25,6 +25,8 @@ class AC180P(ProtocolV2Device):
|
|||||||
# Input Details (1100 - 1300)
|
# Input Details (1100 - 1300)
|
||||||
self.struct.add_decimal_field('ac_input_voltage', 1314, 1)
|
self.struct.add_decimal_field('ac_input_voltage', 1314, 1)
|
||||||
|
|
||||||
|
self.struct.add_bool_field('ac_output_on_0', 1509)
|
||||||
|
|
||||||
# Controls (2000)
|
# Controls (2000)
|
||||||
self.struct.add_bool_field('ac_output_on', 2011)
|
self.struct.add_bool_field('ac_output_on', 2011)
|
||||||
self.struct.add_bool_field('dc_output_on', 2012)
|
self.struct.add_bool_field('dc_output_on', 2012)
|
||||||
@@ -42,15 +44,18 @@ class AC180P(ProtocolV2Device):
|
|||||||
ReadHoldingRegisters(144, 1),
|
ReadHoldingRegisters(144, 1),
|
||||||
ReadHoldingRegisters(146, 1),
|
ReadHoldingRegisters(146, 1),
|
||||||
ReadHoldingRegisters(1314, 1),
|
ReadHoldingRegisters(1314, 1),
|
||||||
|
ReadHoldingRegisters(1509, 1),
|
||||||
ReadHoldingRegisters(2011, 1),
|
ReadHoldingRegisters(2011, 1),
|
||||||
ReadHoldingRegisters(2012, 1),
|
ReadHoldingRegisters(2012, 1),
|
||||||
ReadHoldingRegisters(2020, 1),
|
ReadHoldingRegisters(2020, 1),
|
||||||
ReadHoldingRegisters(2021, 1),
|
ReadHoldingRegisters(2021, 1),
|
||||||
|
ReadHoldingRegisters(2225, 1),
|
||||||
]
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def writable_ranges(self) -> List[range]:
|
def writable_ranges(self) -> List[range]:
|
||||||
return super().writable_ranges + [
|
return super().writable_ranges + [
|
||||||
|
range(1509, 1510),
|
||||||
range(2000, 2022),
|
range(2000, 2022),
|
||||||
range(2200, 2226)
|
range(2200, 2226)
|
||||||
]
|
]
|
||||||
Reference in new issue
Block a user