def pause(self): if self._use_v2: self._hardware.pause() # robot.pause in the legacy API will publish commands to the broker # use the broker-less execute_pause instead else: robot.execute_pause() self.set_state('paused') return self
def pause(self, reason: str = None, user_message: str = None, duration: float = None): if self._use_v2: self._hardware.pause() # robot.pause in the legacy API will publish commands to the broker # use the broker-less execute_pause instead else: robot.execute_pause() self.set_state('paused', reason=reason, user_message=user_message, duration=duration) return self