Go to Post and isn't this fun? :) CD is great :D - rick.oliver [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
  #6   Spotlight this post!  
Unread 08-03-2004, 21:30
gl75 gl75 is offline
Registered User
AKA: Greg
#0075 (RoboRaiders)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Hillsborough NJ
Posts: 16
gl75 is an unknown quantity at this point
Send a message via AIM to gl75
Re: Do you write functions for your code?

I shouldn't be talking since our robot barely worked, but we used a select statement to switch between autonomous modes in user routines fast. This "in theory" will make our autonomous failsafe if the desired mode encounters a problem.


autoMode = DEAD_RECKON;

switch (autoMode)
{
case DONOTHING:
break;

case DEAD_RECKON: /* Dead_Recockning */
// MyTimerInterrupt is calling Handle_DeadReckoning
//rr_auto_mode_dead_reckoning();
// RR_LEFT_DRIVE_MOTOR = leftScaledSpeedCmd;
// RR_RIGHT_DRIVE_MOTOR = rightScaledSpeedCmd;
// RR_LEFT_DRIVE_MOTOR = 157;
// RR_RIGHT_DRIVE_MOTOR = 175;

if(RR_OPTICAL_SENSOR_1 == 1)
autoMode = LINE_TRACKING;
break;

case KNOCK_BALL:
// put something here
break;

case LINE_TRACKING:
rr_auto_mode_line_tracking();
break;

case DONOTHING:
break;

}

-----

We're using a PID control loop also in our autonomous, taking in feedback from 2 encoders mounted on the left and right drive train. We ended up disabling a good portion of it since the encoders kept getting dislodged. Anyone else use a PID loop with success?
__________________
Greg Liebowitz
Team 75 - RoboRaiders
Webmaster/Programmer
www.roboraiders.com

Last edited by gl75 : 08-03-2004 at 21:35.
 


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
What is your most prefered programming language? Hailfire Programming 156 19-01-2005 21:42
Interrupt timer, executing code asap? SeanCassidy Programming 10 07-03-2004 01:47
Inserting Naviagation code into Default code? actorindp Programming 3 28-01-2004 18:12
RC bootup sequence Venkatesh Programming 17 18-11-2003 20:56
Does your team use the Default code. Jeff McCune General Forum 2 09-01-2003 14:46


All times are GMT -5. The time now is 06: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