View Single Post
  #2   Spotlight this post!  
Unread 14-02-2008, 13:35
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
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,854
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: Autonomous and Operator Control modes

For EasyC programming you can ignore the whole 26ms timing. It's hidden from you by EasyC. The code is actually looping as fast as it possibly can, maybe 100,000 times per second.

The Autonomous block will only be called once, so you need your while(1) loop to stay in there and keep going. [correction]The Operator block repeats even if you don't use a while(1) loop, but repeats very fast and isn't restricted by the 26ms timing either.

Your code should be the same at home as at the competition.

EasyC questions are best asked in the EasyC Pro sub-forum (http://www.chiefdelphi.com/forums/fo...play.php?f=164). It might confuse you to read solutions that apply only to the several other methods of programming our robots. Just be careful when you read posts and understand that they may be assuming the use of a different programming method (MPLAB w/IFI default code, MPLAB w/ Watson default code, EasyC, RobotC).

Quote:
Originally Posted by mjbshaw View Post
... we are using easyC for the coding. ...

Assuming I've correctly understood what I've read, does this mean that the main computer will call the autonomous() function every 26.2 milliseconds for the first 15 seconds of the competition, and then start calling the operatorcontrol() function every 26.2 milliseconds for teleoperated mode? We've been using a while loop to make our program run continuously, so would we have to change it for the actual competition? Do we not use a while loop at the competition?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 15-02-2008 at 10:32. Reason: Corrected statement