View Single Post
  #2   Spotlight this post!  
Unread 22-01-2015, 21:30
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Help with LabView lift presets

While it is possible to do this in TeleOp using a state machine, it is probably easier to put this code into Periodic tasks. You can directly check the joystick button there, or you can check the button in teleOp and use a global or other notification mechanism to tell the periodic loop what to do.

The buttons will either add or remove some value to a common set point, and the loop will drive the motor as appropriate to get to the set point.

I know that I've glossed over many of the details, but I don't want to go into details that you don't need. Feel free to ask more questions if needed.

Greg McKaskle
Reply With Quote