Go to Post [IRI] is like shaving the cream that has risen to the top of each championship division putting them into a blender and serving the concoction up to the FIRST community for dessert. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 02-05-2009, 11:11 PM
Shira Shira is offline
Registered User
FRC #1836
Team Role: College Student
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Los Angeles
Posts: 30
Shira is an unknown quantity at this point
Continuous vs. Autonomous in Iterative Robot

So I've decided to use Iterative Robot over Simple Robot. I'm editing the BuiltinDefaultCode project. I notice they use the autonomous and teleoperated periodic functions but not the continuous. I was wondering what the relationship is between the periodic and continuous. If you put code in both, how do they run relative to one another? Also, what specifically is the difference? And I guess, all this leads to the question, what should I use (or based on what should I decide?)

Also, I've found the code I need for getting data from the sensors, but I'm not very familiar with C++ and object oriented programming so I'm not really sure of where to put what.

I've got this for the camera. Which parts go wherever I decide to refresh my sensors? For that matter, where is it a good idea for me to refresh my sensors? Also, is there other necessary camera configuration stuff I need to put in somewhere in my code?
double timestamp; // timestamp of image returned
Image* cameraImage = frcCreateImage(IMAQ_IMAGE_RGB);
if (!cameraImage) { printf("error: %s", GetErrorText(GetLastError()) };

if ( !GetImage(cameraImage, &timestamp) ) {
printf("error: %s", GetErrorText(GetLastError()) };


And then there's this, which I assume will go right after I get my image:
imaqImageToArray(const Image* image, Rect rect, int* columns, int* rows);

And finally there's this: basically, I'm not sure what parts of this (if any) set up the sensors, and which parts just get the data.
Ultrasonic ultra(ULTRASONIC_PING, ULTRASONIC_ECHO);
ultra.SetAutomaticMode(true);
double range = ultra.GetRangeInches();


Any help would be appreciated...there isn't much programming experience on my team. Thanks!
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ Robot: Simple or Iterative? Abrakadabra Programming 3 01-14-2009 10:01 PM
Continuous turret jjdebner Motors 10 02-05-2007 11:19 AM
Iterative Scoring Program TimA Rules/Strategy 1 01-18-2007 09:43 PM
The Continuous Letter Sentence Game xtremedarkness Games/Trivia 38 02-11-2005 10:12 AM
Cable rigging: Cascade vs. Continuous Madison Technical Discussion 2 01-19-2004 11:23 PM


All times are GMT -5. The time now is 10:53 AM.

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