def _start(self): self.target_depth = max(data.depth() + self.amount, 0) pid.depth.heading = self.target_depth
def _poll(self): if abs(self.target_depth - data.depth()) <= self.tolerance: return NavRoutine.COMPLETED return NavRoutine.RUNNING
def _start(self): self.target_depth = data.depth() + self.amount pid.depth.heading = self.target_depth