From 9a60ace03c6c46f9723c8df834c0c5cb8f3d3d77 Mon Sep 17 00:00:00 2001 From: ary Date: Sun, 3 Dec 2023 10:38:50 -0500 Subject: [PATCH] async handling --- CLOUDS/src/main.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CLOUDS/src/main.cpp b/CLOUDS/src/main.cpp index 29b473f..9d9a9c7 100644 --- a/CLOUDS/src/main.cpp +++ b/CLOUDS/src/main.cpp @@ -5,7 +5,10 @@ using namespace superstruct; e_controlsch currentuser = RENU; +pros::Task controlTask(renu_control); + void initialize() { + controlTask.suspend(); ary::printScr(); pros::delay(500); // Ports config @@ -34,15 +37,19 @@ void initialize() { ary::autonselector::initialize(); } -void disabled() {} +void disabled() { + controlTask.suspend(); +} void competition_initialize() {} void autonomous() { + controlTask.resume(); autonomousResets(); ary::autonselector::auton_selector.call_selected_auton(); } void opcontrol() { + controlTask.resume(); disableActiveBrake(); opControlInit(); // Configure the chassis for driver control