Go to Post I, as a programmer, always strive to have the entire robot operate with as little driver input as possible. Those pesky humans.... - dellagd [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 04-04-2011, 19:56
vhcook's Avatar
vhcook vhcook is offline
Reader of Things
AKA: Victoria
FRC #1939 (Kuh-nig-its)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Kansas City, MO
Posts: 546
vhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond repute
Re: Would Someone mind looking over my autonomous.

- If you're controlling your while loop exit condition entirely by the iteration number, why not use a for loop instead?

- Regarding the top nine loops, I think what you might really want to do here is combine your left three loops into one loop, then do the same thing with the middle three and the right three. Based on what you're doing with the iteration counter and the stop button, you seem to want each vertical trio to iterate at the same speed and terminate at the same time. Combining them would reduce the amount of CPU utilization involved as you wouldn't be running multiple waits and multiple instances of the same floating point arithmetic at once. On the other hand, if you're not entirely sure that you really want the timings identical, this may be your best bet.

- Similarly, rather than doing the floating point math on your loop control constants every pass, you could do that outside the loop and pass the value inside on a wire. You could also use a single constant and explain the math it came from in a comment. This isn't going to be terribly important unless you find you're using too much CPU, but every little bit helps.
__________________


Reply With Quote
 


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 20:54.

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