Skip to content

Instantly share code, notes, and snippets.

@auxiliary-character
Created February 15, 2015 02:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save auxiliary-character/34e31d3cffb8cc26777a to your computer and use it in GitHub Desktop.
Save auxiliary-character/34e31d3cffb8cc26777a to your computer and use it in GitHub Desktop.
from wpilib.command import Command
class MastButton(Command):
def __init__(self, robot, speed):
super().__init__()
self.robot = robot
self.requires(self.robot.lift)
self.speed = speed
def execute(self):
self.robot.lift.manualSet(speed)
def isFinished(self):
return False
def cancel(self):
self.robot.lift.manualSet(0)
super().cancel()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment