def on_run(self, time, task, *args, **kwargs): task() self.timer() if task.finished: self.finish() elif self.timer.finished: self.logw('Task timed out in {} seconds!'.format(time)) self.finish()
def on_run(self): theta = (self.this_run_time - self.first_run_time) * 20 # 10 degrees per second ratio = 1 + round(math.floor(theta / 360)) theta /= ratio theta = theta % 360 task = Heading(theta, deadband = 15.) task() if abs(heading_sub_degrees(shm.kalman.heading.get(), shm.desires.heading.get())) < 10.0: VelocityX(1.0)() else: VelocityX(0.0)()
def on_run(self): theta = (self.this_run_time - self.first_run_time) * 20 # 10 degrees per second ratio = 1 + round(math.floor(theta / 360)) theta /= ratio theta = theta % 360 task = Heading(theta, deadband=15.) task() if abs( heading_sub_degrees(shm.kalman.heading.get(), shm.desires.heading.get())) < 10.0: VelocityX(1.0)() else: VelocityX(0.0)()
def on_run(self): task = Heading(self.saved) task() if task.finished: self.finish()
def on_run(self): task = GoToPosition(self.saved[0], self.saved[1], depth = self.saved[2]) task() if task.finished: self.finish()