diff --git a/src/py/bbctrl/Mach.py b/src/py/bbctrl/Mach.py index 677c160..2aee1ef 100644 --- a/src/py/bbctrl/Mach.py +++ b/src/py/bbctrl/Mach.py @@ -139,6 +139,12 @@ class Mach(Comm): if log['msg'] == 'Switch not found': self.estop() + def _end_cycle(self): + if (self._get_cycle() != 'idle' and self._is_ready() + and not self.planner.is_busy() and not super().is_active()): + self.planner.position_change() + self._set_cycle('idle') + def _update(self, update): # Detect motor faults