View Single Post
  #1   Spotlight this post!  
Unread 03-28-2016, 10:23 PM
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 985
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Autonomous not stopping. Constantly running... during enabling

Either of the two posts above should put you down the path of solving the issue.

The code you have now (in addition to not actually stopping the motors in the else) is creating a new timer every time autonomousPeriodic is called. This timer is never started so it will return 0. You can either create the timer once as 'heuristics' has suggested or scrap this and use a command with setTimout() and isTimedOut() as 'euhlmann' has suggested.
Reply With Quote