View Single Post
  #2   Spotlight this post!  
Unread 16-01-2014, 22:55
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,795
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Teleop move motor forward and backwards timed

The sequence looks okay, but has a few problems.

The Joystick button will never change, because the Get is outside the While loop. You'll keep using the value of the button at the time the loop first started.
Just add another Joystick Get inside the While loop.

The cimtest RefNum Get would be better outside the While loop and wired in to Motor Set Output. The RefNum is something that doesn't change, so you don't have to keep retrieving it everytime.

I'd increase the Timer to 20ms, because that's as fast as the button can possibly change.

The button 7 check looks good, but since the wires are on top of one another it's hard to be positive.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 16-01-2014 at 22:58.
Reply With Quote