|
Re: changing main.c
On the other hand, you can learn a lot by looking through all the files. For instance, ifi_aliases.h tells me that there's a flag called disabled_mode that will tell you if the robot is disabled. Much much easier and safer than setting some random variable after you've been in autonomous mode.
Second, I have a strong suspicion that Process_Data_From_Master_uP MUST be called atleast once. I'm pretty sure the GetData(&rxdata) call is what updates ALL of the information on the processor. Including whether or not you are in autonomous mode. If you don't call it while you're disabled and waiting for autonomous mode, you'll never enter autonomous mode. I believe you can get around these restrictions, but you're going to have to be a lot more clever than anything I've seen in this thread so far. Something on the order of swapping the order of the two calls as suggested above AND setting autonomous_mode=1 in your user initialization and also making sure you stay there while you're waiting for the initial disabled period to end and the actual autonomous mode to begin. Probably plus some other clever things I'm not thinking of at midnight. The point being, if you want to play with these files, you can. But you'll have a lot more fun at it if you actually know what's going on.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.
Lone Star Regional Troubleshooter
|