async handling
This commit is contained in:
parent
fb04521168
commit
9a60ace03c
@ -5,7 +5,10 @@ using namespace superstruct;
|
|||||||
|
|
||||||
e_controlsch currentuser = RENU;
|
e_controlsch currentuser = RENU;
|
||||||
|
|
||||||
|
pros::Task controlTask(renu_control);
|
||||||
|
|
||||||
void initialize() {
|
void initialize() {
|
||||||
|
controlTask.suspend();
|
||||||
ary::printScr();
|
ary::printScr();
|
||||||
pros::delay(500); // Ports config
|
pros::delay(500); // Ports config
|
||||||
|
|
||||||
@ -34,15 +37,19 @@ void initialize() {
|
|||||||
ary::autonselector::initialize();
|
ary::autonselector::initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void disabled() {}
|
void disabled() {
|
||||||
|
controlTask.suspend();
|
||||||
|
}
|
||||||
void competition_initialize() {}
|
void competition_initialize() {}
|
||||||
|
|
||||||
void autonomous() {
|
void autonomous() {
|
||||||
|
controlTask.resume();
|
||||||
autonomousResets();
|
autonomousResets();
|
||||||
ary::autonselector::auton_selector.call_selected_auton();
|
ary::autonselector::auton_selector.call_selected_auton();
|
||||||
}
|
}
|
||||||
|
|
||||||
void opcontrol() {
|
void opcontrol() {
|
||||||
|
controlTask.resume();
|
||||||
disableActiveBrake();
|
disableActiveBrake();
|
||||||
opControlInit(); // Configure the chassis for driver control
|
opControlInit(); // Configure the chassis for driver control
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user