Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def RobotInit(self):
wpilib.Wait(0.25)
winchControl.SetOutputRange(-1.0, 1.0)
kickerEncoder.Start()
leftDriveEncoder.Start()
rightDriveEncoder.Start()
compressor.Start()
def Disabled(self):
while self.IsDisabled():
CheckRestart()
wpilib.Wait(0.01)
def disabled():
while wpilib.IsDisabled():
checkRestart()
wpilib.Wait(0.01)
def disabled():
while wpilib.IsDisabled():
checkRestart()
wpilib.Wait(0.01)
def Autonomous(self):
self.GetWatchdog().SetEnabled(False)
while self.IsAutonomous() and self.IsEnabled():
CheckRestart()
wpilib.Wait(0.01)
def disabled():
while wpilib.IsDisabled():
checkRestart()
wpilib.Wait(0.01)
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)
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)
def DisabledContinuous(self):
wpilib.Wait(0.01)
def AutonomousContinuous(self):