def homeHandler(self): """Homes all the limit switches for the handler.""" self.controller.addCommand( FlipCommand(self.controller.handler, 'down', home=True)) self.controller.addCommand( CombinedCommand([ ShiftCommand(self.controller.drill, self.controller.handler, 0, inAbsolute=True, home=True, rapid=True), SpinCommand(self.controller.handler, 0, home=True), ]))
def top(): return CombinedCommand([ SpinCommand(self.handler, 0), FlipCommand(self.handler, 'up') ])
def right(): return CombinedCommand([ SpinCommand(self.handler, 270), FlipCommand(self.handler, 'down') ])
def left(): return CombinedCommand([ SpinCommand(self.handler, 90), FlipCommand(self.handler, 'down') ])
def back(): return CombinedCommand([ SpinCommand(self.handler, 180), FlipCommand(self.handler, 'down') ])
def front(): return CombinedCommand([ SpinCommand(self.handler, 0), FlipCommand(self.handler, 'down') ])
def calibrateHandler(self): self.controller.addCommand(FlipCommand(self.controller.handler, 'up')) self.pauseCommand() self.controller.addCommand(FlipCommand(self.controller.handler, 'down'))