dev
This commit is contained in:
parent
47b9d8aa4f
commit
561ab6c84d
@ -431,9 +431,6 @@ class Test(Widget):
|
|||||||
if step.spec["warning_img"]:
|
if step.spec["warning_img"]:
|
||||||
steps.insert(i, Step(step_type="warning_img", spec={"warning_img": step.spec["warning_img"]}))
|
steps.insert(i, Step(step_type="warning_img", spec={"warning_img": step.spec["warning_img"]}))
|
||||||
skip.add(i + 1)
|
skip.add(i + 1)
|
||||||
if step.step_type in "pipe_cutter":
|
|
||||||
self.pipe_cutter_step = step
|
|
||||||
|
|
||||||
if "assembly" in step.spec:
|
if "assembly" in step.spec:
|
||||||
if step.spec["assembly"]:
|
if step.spec["assembly"]:
|
||||||
steps.insert(i, Step(step_type="instructions", spec={}))
|
steps.insert(i, Step(step_type="instructions", spec={}))
|
||||||
|
|||||||
@ -6,6 +6,16 @@ from PyQt5.QtCore import QByteArray
|
|||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
def get(self, *args, **kwargs):
|
||||||
|
"""
|
||||||
|
Retrieve the current cutting length and update the interface.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
self.current_cut_length = self.components["pipe_cutter"]._get_length()
|
||||||
|
logger.info(f"Current cut length: {self.current_cut_length}")
|
||||||
|
self.visualize()
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Failed to get current cut length: {e}")
|
||||||
|
|
||||||
class Test_Pipe_Cutter(Test_Test):
|
class Test_Pipe_Cutter(Test_Test):
|
||||||
"""
|
"""
|
||||||
@ -40,6 +50,7 @@ class Test_Pipe_Cutter(Test_Test):
|
|||||||
if step is not None :
|
if step is not None :
|
||||||
self.start_cutting()
|
self.start_cutting()
|
||||||
self.stop_cutting()
|
self.stop_cutting()
|
||||||
|
self.stop()
|
||||||
return show
|
return show
|
||||||
|
|
||||||
def start_cutting(self,recipe=None,step=None):
|
def start_cutting(self,recipe=None,step=None):
|
||||||
@ -77,10 +88,11 @@ class Test_Pipe_Cutter(Test_Test):
|
|||||||
logger.error(f"Failed to stop the pipe cutting process: {e}")
|
logger.error(f"Failed to stop the pipe cutting process: {e}")
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
|
|
||||||
self.components["pipe_cutter"].pause()
|
self.components["pipe_cutter"].pause()
|
||||||
self.disconnect(self.get_connection)
|
self.disconnect(self.get_connection)
|
||||||
super().stop()
|
super().emit_ok()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def reset_machine(self):
|
def reset_machine(self):
|
||||||
"""
|
"""
|
||||||
@ -91,4 +103,3 @@ class Test_Pipe_Cutter(Test_Test):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Failed to reset the pipe cutter machine: {e}")
|
logger.error(f"Failed to reset the pipe cutter machine: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user