Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@action
def reboot(self):
print("reboot app device")
self._app._reboot_action()
@action
def restart(self):
print("restart app")
self._app._restart_action()
@action
def stop(self, **kwargs):
coast = kwargs.pop("break", True)
self.outputs["left_speed"].value = 0
self.outputs["right_speed"].value = 0
@action
def restart(self):
self._module._restart_action()
@action
def stop(self):
self._module._stop_action()
@action
def stop(self, **kwargs):
coast = kwargs.pop("break", True)
self.outputs["left_speed"].value = 0
self.outputs["right_speed"].value = 0
@action
def stop(self):
print("stop app")
self._app._stop_action()
@action
def rotate(self, **kwargs):
speed = kwargs.pop("speed",None)
wheel_rotations = kwargs.pop("wheel_rotations",None)
duration = kwargs.pop("duration",None)
print("steering rotate:", speed)
new_direction = self._adjust
left_speed = speed * (-new_direction / 100)
right_speed = speed * (new_direction / 100)
self.outputs["left_speed"].value = left_speed
self.outputs["right_speed"].value = right_speed
if duration:
time.sleep(duration)
@action
def scroll_v(self):
pass
@action(confirm=True, confirm_message="Reboot device")
def reboot(self):
self._app._reboot_action()