Hi! We are trying to create some auto mode code but we keep getting a "WARNING: wpilib.motorsafety : Robot Drive.... Output not updating often enough". We are using a string of elif statements with the auto counter to avoid using for loops and while loops.
Code:
if self.auto_loop_counter<=25:
self.non_existant_motor.set(-.5)
self.sol.set(True)
self.auto_loop_counter+=1
elif self.auto_loop_counter <= 100 and self.auto_loop_counter>25:
self.robot_drive.drive(-0.5, 0) # Drive forwards at half speed
self.auto_loop_counter += 1
self.sol.set(False)
self.non_existant_motor.set(0)
else:
self.robot_drive.drive(0, 0)
We have many more elifs then that but that is the basic framework of our code. Any help will be greatly appreciated!