View Single Post
  #1   Spotlight this post!  
Unread 12-02-2015, 17:06
team-4480's Avatar
team-4480 team-4480 is offline
Debug? What's that?
FRC #4480
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Minnesooota
Posts: 222
team-4480 will become famous soon enoughteam-4480 will become famous soon enough
Python: Robot Drive is not updating often enough in Auto mode?

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!