View Single Post
  #6   Spotlight this post!  
Unread 01-03-2012, 00:18
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: Team Fusion 364 2012 Code

Quote:
Originally Posted by plnyyanks View Post
I'm impressed with your code. It looks really well done (and well documented, which is almost as important). Kudos to your team for some nice software. One question: in your autonomous, was there any reason for using a bunch of sequential while loops instead of using a state machine(s)? Maybe it's just me, but I tend to prefer state machines for this kind of thing - we have many in our code....
The student that did it went off of the demo autonomous code. It's in multiple while loops because of the safety configuration for the drive motors. If a value is not fed within 100ms, the motors will cut off. Since we're driving the motors for longer than 100ms in each pass, the motors would error out and cease to work. It's easier to see sequentially like the way it's done. State machines are often hard to follow in LabVIEW since they will most likely involve a case structure, which will hide code from you.

He could have just disabled the safety config on it, but in the long run, it doesn't matter either way.
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
Reply With Quote