Re: Tasks and Multi-Threading
Yes, you can call startTask from inside of the same task running. It will simply jump to the top of that task and restart it from the first line of code inside of it. It will not "stop" anything, however, in the concept of stopping motors (i.e. the task started a motor, was then "restarted" via the startTask command - the motor will keep running until something tells it to stop, or all tasks complete)
Here's an example program of this in action. The variable "globalCounter" will never increment higher than 1.
ROBOTC Developer - SW Engineertfriez@robotc.net