View Single Post
  #7   Spotlight this post!  
Unread 19-01-2003, 15:03
Neal Turett Neal Turett is offline
Registered User
#0201
 
Join Date: Nov 2002
Location: Rochester Hills
Posts: 34
Neal Turett is on a distinguished road
Work-around

Before we built a dongle, I just took an extra var (size = 1bit) and initialized it to 1. Then i'd have:

autom = 1

MainLoop:

if autom (my var) = 0 then endauto
if p1_sw_top = 1 then endauto

goto endmainloop:

autonomous code....

endauto:

autom = 0

normal code....

endmainloop:
serout(...)

goto mainloop:

That worked well enough, especially since it gave you a easily reachable kill-switch. Only thing to note is that if you use dead-reackoning, you need to tie the beginning of your autonomous code to another button, lest it run while the robot is disabled while the RC is not plugged in and your timer-count increase.