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: