View Single Post
  #13   Spotlight this post!  
Unread 02-04-2014, 01:00
Levansic's Avatar
Levansic Levansic is offline
Registered User
AKA: Len Evansic
FRC #0585 (Cyber Penguins)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Tehachapi, CA
Posts: 185
Levansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud of
Re: Real time versus normal timing

On the question about the 500 ms delay, that is there only for the case of firing the solenoids. It doesn't affect other threads, and doesn't fire until the motors in this thread are disabled (in one direction) by their limit switches.

The idea of checking every other loop may be a good idea, but we use the status of both limit switches together for an interlock on our catapult. We don't want to launch until both are tripped, or else parts will fly.

If we did that, I guess we could use a shift register to keep the state of the unread one. At that point, we would probably have to speed up the loop, or face problems with our autonomous code. Maybe it wouldn't be a problem, and the benefit of putting less noise on CAN may benefit other parts (drive) more.

Thanks for the suggestion!
Reply With Quote