Stop Everything in RobotC?

Is there a function that can disable everything in RobotC? For instance:

void skillsTimer()
{
	wait1Msec(60000);
	//Put some sort of a command here that freezes everything
}

task programmingSkillsTimer()
{
	skillsTimer();
}

task autonomous()
{
	StartTask(programmingSkillsTimer);
	mySkillsRun();
}

Thanks in advance for your help!

I usually prefer a massive while loop.
The line of code
while(1==1)
will stop everything

Have you tried the command “StopAllTasks()”? It stops all tasks in the program, including task main.
To restart the program, you would need to cycle the power on the cortex.

I almost tried that but thought it wouldn’t stop functions. I forgot about task main…should’ve tried it before posting. Thanks!

If you want to keep the main task running and you have included “Vex_Competition_Includes.c”, you can use allMotorsOff. It just turns off all the motors, butt still keeps all the tasks and loops running how they were. For Example,


void skillsTimer()
{
	wait1Msec(60000);
	allMotorsOff();
}