Go to Post Inspiration is created by a vision and is reinforced with success. - rourke [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
  #2   Spotlight this post!  
Unread 17-12-2012, 23:26
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: New autonomous outline tutorial

Maybe I'm completely missing the point, but why not just call the commands in a list, procedurally? Like, if you had functions drive_straight(float dist, float speed) and fire_ball(void) you could just do

Code:
void autonomous_1() 
{
drive_straight(10,30);
fire_ball();
wait(500);
fire_ball();
drive_straight(-10,30);
}
And you would make more functions for more autonomous modes. It seems like a more elegant and execution-efficient solution.


I'm not saying there aren't reasons for storing commands in a list. In fact, I myself wrote a system which is by all metrics complex in LabVIEW to do a similar thing. However, I was trying to gain the ability to store the command vector in a text file, and load it on demand. Had I only wanted to write the commands in LabVIEW, I would have just called the command blocks in sequence (which I did successfully in our 2010 season, which suffered only from a very long on-field iteration time due to LV compile time issues).
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
 


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


All times are GMT -5. The time now is 21:34.

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