|
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.
|