Go to Post So.... football pizza water game with minibots and megabots? - euhlmann [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
  #4   Spotlight this post!  
Unread 08-12-2008, 17:37
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Simple C++ State Machine

When you talk about iterative being similar to how you've programmed in the past, are you referring to the default code of previous years? WPILib was available for the past two years and previous versions resemble the "Simple Robot" class much more than interative.

At any rate,

It's possible I'm not understanding this properly but why would you create a specialized class to handle this? Can't information that you need to be maintained between iterations be kept as members of your robot class itself without having to be dynamically allocated? While the stacks for the functions may be popped off as you go through iterations, isn't the original instance of the entire class used throughought the running of the program? Wouldn't it be much simpler to use a simple switch statement in your periodic functions with an enumerator to determine which function to call at the appropriate time?
__________________

Last edited by slavik262 : 08-12-2008 at 17:40.
 


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
State machine in LabVIEW? JBotAlan National Instruments LabVIEW and Data Acquisition 3 23-10-2008 07:59
Hawaii Gov. Lingle State of State speech-FIRST and STEM MoeMom FIRST In the News... 0 29-01-2008 17:04
2 simple questions RDD Rules/Strategy 4 10-01-2007 16:41
EDU Demo Code: Serial Data Transmitter Using a State-Machine Kevin Watson Programming 3 28-12-2003 22:56
Choosing a machine shop (Re: How important is a machine shop archiver 2001 9 24-06-2002 04:20


All times are GMT -5. The time now is 22:32.

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