Go to Post I'm not the programmer, thank god. - Veselin Kolev [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Spotlight this post!  
Unread 08-02-2007, 13:15
kaszeta's Avatar
kaszeta kaszeta is offline
Registered User
FRC #0095 (Grasshoppers)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Lebanon, NH
Posts: 334
kaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of lightkaszeta is a glorious beacon of light
Re: Autonomous Mode

Quote:
Originally Posted by Zero_Cool View Post
don't forget the switch statement, which can be more useful or better for use in autonomous.
Indeed, it's very useful for programmers doing autonomous work to understand the concept of the finite state machine (http://en.wikipedia.org/wiki/Finite_state_machine), since that is one of the easiest ways to come up with a clearly written and debug-able autonomous routine.

Most of our routines end up looking something like:

Code:
switch (auto_state) {
	case INITIALIZE:
	  Auto_Initialize(); // Set up auto mode
          auto_state=FASTASPPROACH
	  break;
       case APPROACH: 
          // Code that drives towards goals quickly, and at some point
          // resets auto_state to SCORE
          break;
       case SCORE: 
          // Score many points!
	  break;  
	case DONE:
	default:
        // do nothing!
        
      break;
  }
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Autonomous Mode Slick Programming 22 01-02-2007 19:26
autonomous mode seanl Programming 6 31-01-2007 15:59
Autonomous mode chs938 Programming 1 03-02-2006 10:19
Autonomous Mode David Bryan Programming 1 21-01-2003 21:15
autonomous mode? bigwalt Technical Discussion 1 21-01-2003 01:14


All times are GMT -5. The time now is 07:05.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi