Go to Post Don't bash FIRST for what you do not know. - David Kelly [more]
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-10-2003, 07:23 PM
Jared Stofflett Jared Stofflett is offline
Registered User
Join Date: Nov 2003
Location: Hamtramck
Posts: 10
Jared Stofflett is an unknown quantity at this point
Send a message via AIM to Jared Stofflett
Programming Autonomous mode

How do you program Autonomous mode on the new controllers? I just figured I would go into the main.c file and fix it up the way I wanted it. The comments say not to edit this though, so any help on where to call the functions I write for Autonomous mode would be appreciated. In addition, how do you stop the joystick from getting input?
  #2   Spotlight this post!  
Unread 11-10-2003, 07:42 PM
Jeremy_Mc's Avatar
Jeremy_Mc Jeremy_Mc is offline
no team
Team Role: Mentor
Join Date: Feb 2002
Rookie Year: 2002
Location: Orlando, FL
Posts: 496
Jeremy_Mc has a spectacular aura aboutJeremy_Mc has a spectacular aura about
In the user_functions.c there's a part that says "INSERT YOUR OWN CODE HERE" (or something to that effect). I'm assuming that's where you insert your own code

On the other question, I believe the Programming Guide says there's no way to switch between autonomous and user modes on the EDU-Controller. (I might be wrong on that one) But you COULD make some auto. code and then upload diff code to practice driving...
GitHub - Collaborate on code, documentation, etc. - http://github.com
  #3   Spotlight this post!  
Unread 11-10-2003, 08:34 PM
Kel D's Avatar
Kel D Kel D is offline
Registered User
FRC #0433 (Firebirds)
Team Role: Alumni
Join Date: Apr 2003
Rookie Year: 2002
Location: Mary Esther, Fl
Posts: 121
Kel D is just really niceKel D is just really niceKel D is just really niceKel D is just really niceKel D is just really nice
Send a message via AIM to Kel D
From what I gather the only files, or whatever they are called, that you should change are the user_routines and the user_routines_fast. The other ones shouldn't be changed.
  #4   Spotlight this post!  
Unread 11-11-2003, 08:32 AM
KevinB's Avatar
KevinB KevinB is offline
Registered User
AKA: Alum
no team
Team Role: Alumni
Join Date: Dec 2002
Rookie Year: 2001
Location: AL
Posts: 188
KevinB will become famous soon enoughKevinB will become famous soon enough
Send a message via ICQ to KevinB
I would just connect a switch to one of the digital inputs and use that to control when the bot is in "autonomous" mode vs. driver-controlled mode.

Then just use an "if" statement:

if (rc_dig_in16) {
  // Run Autonomous Code
} else {
  // Run Driver Control Code
You could put this in the Process_Data_From_Master_uP() function found in user_routines.c. If you want to keep the default drive code, put it after the call to Default_Routine(), however you could nix the default drive code by replacing that call with your new code.
Closed Thread

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
autonomous mode problem on field Chris_C Programming 17 03-26-2003 06:11 PM
autonomous sensor programming ? Laura_d Programming 1 02-10-2003 04:46 PM
autonomous mode timer Don Programming 6 02-09-2003 09:16 PM
How do you do the autonomous programming? Ryan Collings Programming 11 02-07-2003 06:38 PM
autonomous mode? bigwalt Technical Discussion 1 01-21-2003 12:14 AM

All times are GMT -5. The time now is 11:40 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi