dev pipe
This commit is contained in:
parent
3b9cefc009
commit
4a6fa63ef7
@ -47,8 +47,6 @@ class PipeCutterComponent(ModbusComponent):
|
|||||||
try:
|
try:
|
||||||
# Read holding register at 4x767 (register 767) for a single register (count=1)
|
# Read holding register at 4x767 (register 767) for a single register (count=1)
|
||||||
response = self.read(register=766, count=1, )
|
response = self.read(register=766, count=1, )
|
||||||
status = response
|
|
||||||
return status
|
|
||||||
|
|
||||||
except KeyError as ke:
|
except KeyError as ke:
|
||||||
self.log.error(f"KeyError while accessing Pipe Cutter register 4x766: {ke}")
|
self.log.error(f"KeyError while accessing Pipe Cutter register 4x766: {ke}")
|
||||||
@ -62,6 +60,8 @@ class PipeCutterComponent(ModbusComponent):
|
|||||||
self.log.error(f"Unexpected error in Pipe Cutter _get method at 4x766: {e}")
|
self.log.error(f"Unexpected error in Pipe Cutter _get method at 4x766: {e}")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
super()._get([response])
|
||||||
|
|
||||||
def _convert_from_format(self, data, formatting=None, decoding_map=None):
|
def _convert_from_format(self, data, formatting=None, decoding_map=None):
|
||||||
if decoding_map is not None and data in decoding_map:
|
if decoding_map is not None and data in decoding_map:
|
||||||
data = decoding_map[data]
|
data = decoding_map[data]
|
||||||
|
|||||||
@ -101,7 +101,7 @@ class Test_Pipe_Cutter(Test_Test):
|
|||||||
return
|
return
|
||||||
data = data[-1]
|
data = data[-1]
|
||||||
if self.end_cut is True:
|
if self.end_cut is True:
|
||||||
ok = "Done"
|
ok = True
|
||||||
else:
|
else:
|
||||||
ok = None
|
ok = None
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user