Go to Post You can build an amazing robot that is capable and beautiful on a limited budget. - Andy Baker [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 18-02-2003, 00:50
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 Mike375
Does a debug statement showing the states of the switches show what you expect.

-I have no idea how debug works


put this in your program and download it:

DEBUG cls,bin8 rc_swA,cr

a little window will appear with a 1's and 0's representation of the first 8 digital inputs.

What code are you using to try to switch programs?

-I was hoping a simple IF THEN in the autonomous section of code would perform this task

example:
counter var word
counter=0

IF auton mode = 1 THEN
select counter


is this all your IF is to decide ? I see no 'endif', efendi.

IF rc_sw1=1 THEN start_left:
IF rc_sw2=1 THEN start_right:


With no distinction, these should execute all the time

'Starting on left side of field
start_left:
(left auto program here)
goto imdone:

'Starting on right side of field
start_right:
(right auto program here)
goto imdone:

ELSE 'Resume Human Control
imdone:
I would make the converse statement,

if auton_mode = 0 then goto end_o_this_code

{auto mode stuff, like if left_sw then goto the_left, &c}

end_o_this_code:

rest of program:
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
2-week FIRST summer program @ WPI ColleenShaver General Forum 20 31-05-2009 03:02
Fried program slots? Jeff Waegelin Programming 18 19-03-2003 18:08
Ahh! Program trick confusing! archiver 2001 9 24-06-2002 02:26
Credits for FIRST program. archiver 2000 6 24-06-2002 00:16
An invitation for HS Juniors archiver 2000 0 23-06-2002 22:51


All times are GMT -5. The time now is 08:55.

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