View Single Post
  #4   Spotlight this post!  
Unread 14-02-2013, 08:50
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,513
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Single Motor Teleop/Autonomous being quirky.

It causes no end of problems in LabView when people use multiple set motor outputs in different locations.

My suggestion is to have your set motor outputs in Autonomous and Teleop, because you know they never operate concurrently. Have a global variable set the output. Then, set the value of that global variable in the periodic task loop.

Likewise, never set a global variable in more than one place at one time. You can set them in teleop and in auton. Or you can set them in periodic tasks. But you should not set them in teleop AND periodic, and you should never set them in auton AND periodic. You will inevitably run into race conditions if you set a global in 2 vi's that are running at the same time.