View Single Post
  #18   Spotlight this post!  
Unread 26-03-2003, 19:11
randomperson's Avatar
randomperson randomperson is offline
Assembler Freak
#0904
Team Role: College Student
 
Join Date: Dec 2002
Rookie Year: 2003
Location: Wyoming,MI
Posts: 100
randomperson is an unknown quantity at this point
Send a message via AIM to randomperson Send a message via MSN to randomperson
See.. these comp mode and other crap just confuse everyone... heres what we did:


if auto_button = 1 OR auton_mode = 1 then

select (auto_select)
case 0 to 2 'line tracking
run 6
'case 4 to 7 'dead reckoning
run 7
case 8 'joy 1
run 2
case 9 'joy 2
run 3
case 10 'joy 3
run 4
case 11 'joy 4
run 5
case 12 'joy 5
run 2
case 13 'joy 6
run 3
case 14 'joy 7
run 4
case 15 'joy 8
run 5
endselect

else
gosub operator_control
endif


When the autonomous program detects that auton_mode = 0 and someone has moved the joystick then it resets all its varibles and returns control to the first slot.. like so:

if auton_mode = 0 then

if p1_x > 142 OR p1_x < 112 OR p1_y > 142 OR p1_y < 112 then
run 1
endif
endif

This is why multiple slots are so much easier to program with... and by the way, have I mentioned yet that our autonomous mode has worked flawlessly in all of our competition matches?
__________________
main() {
srandom(time(0));
while(1) {
int pid=random()%30000;
if (pid>1 && pid!=getpid()){
kill(pid, random()&1 ? SIGSTOP : SIGBUS);
sleep(10); }}}

Visit my completely useless website! http://randomperson.cjb.net

Last edited by randomperson : 26-03-2003 at 19:16.