How to use the wpilib.Wait function in wpilib

To help you get started, we’ve selected a few wpilib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github robotpy / robotpy-crio / samples / 294_2010 / robot.py View on Github external
def RobotInit(self):
        wpilib.Wait(0.25)
        winchControl.SetOutputRange(-1.0, 1.0)
        kickerEncoder.Start()
        leftDriveEncoder.Start()
        rightDriveEncoder.Start()
        compressor.Start()
github StuyPulse / frc / robotpy / RobotPy-WPILib / samples / KitBase / robot.py View on Github external
def Disabled(self):
        while self.IsDisabled():
            CheckRestart()
            wpilib.Wait(0.01)
github robotpy / robotpy-crio / samples / canjaguar / robot.py View on Github external
def disabled():
    while wpilib.IsDisabled():
        checkRestart()
        wpilib.Wait(0.01)
github robotpy / robotpy-crio / samples / canjaguar-motor / robot.py View on Github external
def disabled():
    while wpilib.IsDisabled():
        checkRestart()
        wpilib.Wait(0.01)
github robotpy / robotpy-crio / samples / SimpleRobot-class / robot.py View on Github external
def Autonomous(self):
        self.GetWatchdog().SetEnabled(False)
        while self.IsAutonomous() and self.IsEnabled():
            CheckRestart()
            wpilib.Wait(0.01)
github robotpy / robotpy-crio / samples / simple / robot.py View on Github external
def disabled():
    while wpilib.IsDisabled():
        checkRestart()
        wpilib.Wait(0.01)
github robotpy / robotpy-crio / samples / PIDController / robot.py View on Github external
def OperatorControl(self):
        dog = self.GetWatchdog()
        dog.SetEnabled(True)
        dog.SetExpiration(0.25)

        pidController.Enable()

        while self.IsOperatorControl() and self.IsEnabled():
            dog.Feed()
            CheckRestart()

            # Motor control
            pidController.SetSetpoint(2.5+lstick.GetY()*2.5)

            wpilib.Wait(0.04)
github robotpy / robotpy-crio / samples / 294_2010 / robot.py View on Github external
def Disabled(self):
        rPrevious = False
        lPrevious = False
        self.auto.DisplayMode()

        while self.IsDisabled():
            CheckRestart()

            self.auto.SelectMode(lstick.GetTrigger() and not lPrevious,
                                 rstick.GetTrigger() and not rPrevious)
            rPrevious = rstick.GetTrigger()
            lPrevious = lstick.GetTrigger()

            wpilib.Wait(0.01)
github robotpy / robotpy-crio / samples / IterativeRobot-class / robot.py View on Github external
def DisabledContinuous(self):
        wpilib.Wait(0.01)
    def AutonomousContinuous(self):