View Single Post
  #3   Spotlight this post!  
Unread 17-06-2016, 08:15
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 429
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
If you're using a command based project the above code may be difficult to integrate.

Instead you could just stop the scheduler from running (preventing your commands from executing) by calling Scheduler.getInstance().disable();

When you want to enable the scheduler again call Scheduler.getInstance().enable();

Note that depending on how you output values to your motor controllers, they could latch on the last command they received before you pressed the button. Test your code out with the robot on blocks and with a mechanism that can't stall out and break itself before you use it for anything safety related.

Note that the robot is still "enabled" so it's possible for things to move of they are commanded to do so (if you have code that sets outputs that's not run within a command).

Sent from my LGLS751 using Tapatalk
__________________
http://team2168.org
Reply With Quote