Go to Post Wow, 4 pages of arguments over water...... Is it the off season or what? - Botsup [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-02-2003, 17:04
Morgoth Morgoth is offline
Registered User
#0471 (Cybertigers)
 
Join Date: Oct 2002
Location: Michigan
Posts: 35
Morgoth is an unknown quantity at this point
Auton Mode simple question

All right, from what I understand before the match the inputs will be this:

comp_mode = 1
auton_mode = 0

then when autonomous mode is engaged it will change to:

comp_mode = 0
auton_mode = 1

and after the match is over it will be:

comp_mode = 1
auton_mode = 0

So if I put code in my robot like this:

autonloop:
if (comp_mode = 0 AND auton_mode = 1) then
'whatever you want it to do during autonmode
goto autonloop:
endif


then you shouldn't have to worry about timing assuming that you can take your ques off of the comp and auton variable changes.

Would this work?
__________________
"Lock the Doors"

NASA chief flight director Leroy Cain on the loss of Columbia's signal.
  #2   Spotlight this post!  
Unread 06-02-2003, 17:37
n[ate]vw's Avatar
n[ate]vw n[ate]vw is offline
Registered User
#0933 (Adler Attack)
 
Join Date: Jan 2003
Location: Rockford, IL
Posts: 48
n[ate]vw is an unknown quantity at this point
Send a message via AIM to n[ate]vw
search for comp_mode, but I'm pretty sure comp_mode is set to 1 whenever the robot is on, so to speak.
__________________
Adler Attack #933 -- Trigos
  #3   Spotlight this post!  
Unread 06-02-2003, 18:55
Morgoth Morgoth is offline
Registered User
#0471 (Cybertigers)
 
Join Date: Oct 2002
Location: Michigan
Posts: 35
Morgoth is an unknown quantity at this point
But would it be legal? (changing that is a quick fix)
__________________
"Lock the Doors"

NASA chief flight director Leroy Cain on the loss of Columbia's signal.
  #4   Spotlight this post!  
Unread 06-02-2003, 19:09
rust710's Avatar
rust710 rust710 is offline
Registered User
#0862 (Lightning Robotics)
 
Join Date: Dec 2002
Location: Canton, MI
Posts: 103
rust710 is an unknown quantity at this point
Send a message via AIM to rust710
To tell you the truth, there are not to many rules in software except that it must work and teams are responsible for any problems with it.

Morgoth your code look correct too.
__________________
Andrew Radamis
Programmer on 862
info@lightingrobotics.com
  #5   Spotlight this post!  
Unread 06-02-2003, 22:30
Morgoth Morgoth is offline
Registered User
#0471 (Cybertigers)
 
Join Date: Oct 2002
Location: Michigan
Posts: 35
Morgoth is an unknown quantity at this point
Thanks, now I don't have to worry about the timing.
__________________
"Lock the Doors"

NASA chief flight director Leroy Cain on the loss of Columbia's signal.
  #6   Spotlight this post!  
Unread 09-02-2003, 00:00
n[ate]vw's Avatar
n[ate]vw n[ate]vw is offline
Registered User
#0933 (Adler Attack)
 
Join Date: Jan 2003
Location: Rockford, IL
Posts: 48
n[ate]vw is an unknown quantity at this point
Send a message via AIM to n[ate]vw
Actually, Team Update #11 changed these bits

Before match - comp=1,auto=0
During autonomous - comp=0,auto=1
During human driver - comp=0,auto=0
After match is over - comp=1,auto=0

Note that 'comp' and 'auto' are abbreviations for actual variable names.

So what you originally said was correct. Sorry about that.
__________________
Adler Attack #933 -- Trigos

Last edited by n[ate]vw : 09-02-2003 at 00:03.
  #7   Spotlight this post!  
Unread 09-02-2003, 01:17
Carl Owenby Carl Owenby is offline
Registered User
#0654 (Maclay Robotics)
 
Join Date: Jan 2003
Location: Tallahassee, FL
Posts: 24
Carl Owenby is an unknown quantity at this point
Autonomous Program Code

Here's the autonomous code that we are using. It seems to work. You are welcome to use it as you see fit.

I turn the Robot Controller's Basic Run LED off when the Competition Control is disabled, turn it on during the Autonomous Robot Control period, and make it flash during the Operator Control period. This gives me an indication on the Robot Controller similar to the Competition Control indicator on the Operator Interface.

If comp_mode = 0 then Relay_Control
'Competition Control is disabled
Out7 = 0 'Basic Run LED off when Competition Control disabled
Goto End_Control

Relay_Control:
'Competition Control is enabled
relay3_fwd = rc_sw3 'Air compressor on when pressure switch closed - Green
relay3_rev = 0 'Disable Relay 3 reverse function

relay8_fwd = 1 'Rotating light on when Competition Control not disabled - Green
relay8_rev = 0 'Disable Relay 8 reverse function

If auton_mode = 0 then Oper_Control
'Game is in Autonomous Robot Control Period
Out7 = 1 'Basic Run LED on during Autonomous Robot Control Period

'ADD OTHER AUTONOMOUS PROGRAM CODE HERE

Goto End_Control

Oper_Control:
'Game is in Operator Control Period
Toggle 7 'Basic Run LED flashes during Operator Control Period
relay1_fwd = p1_sw_trig 'Left Index - Lower Left Arm - Green
relay1_rev = p1_sw_top 'Left Thumb - Raise Left Arm - Red
relay2_fwd = p2_sw_trig 'Right Index - Lower Right Arm - Green
relay2_rev = p2_sw_top 'Right Thumb - Raise Right Arm - Red

End_Control:

Hope this helps...
__________________
There are 10 kinds of people in this world; those who understand binary and those who don't.
  #8   Spotlight this post!  
Unread 10-02-2003, 10:10
Lloyd Burns Lloyd Burns is offline
Registered User
FRC #1246 (Agincourt Robotics)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Toronto
Posts: 292
Lloyd Burns is an unknown quantity at this point
Quote:
Originally posted by n[ate]vw
search for comp_mode, but I'm pretty sure comp_mode is set to 1 whenever the robot is on, so to speak.
No, comp mode is 1 only when the robots are disabled before and after the 2 minutes.

If the auton_mode is 1 at some time during the match, and comp_mode is turned on (can you say DQ?), auton_mode cannot remain 1. When the comp_mode is switched to 0 again, auton_mode goes to 1. (I used a New Yellow Dongle.)
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 26-03-2003 19:11
auton mode running motors incorrectly BK36 Programming 2 12-03-2003 02:43
Can't figure out auton mode TangoBravo1318 Programming 1 20-02-2003 10:06
Canvas in Delphi - Simple question archiver 2000 1 24-06-2002 00:30
simple engineering question Ben Mitchell Technical Discussion 2 07-11-2001 07:50


All times are GMT -5. The time now is 05:23.

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