remove old threading stuff
move tasks to intake only, can be updated as needed
This commit is contained in:
parent
6fb52cdd8a
commit
9ad8cf220e
@ -5,20 +5,7 @@ using namespace superstruct;
|
|||||||
|
|
||||||
e_controlsch currentuser = RENU;
|
e_controlsch currentuser = RENU;
|
||||||
|
|
||||||
void taskMethods() {
|
|
||||||
while (true) {
|
|
||||||
/*
|
|
||||||
Handle controls for whoever is driving the bot at the moment, each available user a respective set of controls
|
|
||||||
*/
|
|
||||||
renu_control();
|
|
||||||
pros::delay(ary::util::DELAY_TIME);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pros::Task subsystemsTask(taskMethods);
|
|
||||||
|
|
||||||
void initialize() {
|
void initialize() {
|
||||||
subsystemsTask.suspend();
|
|
||||||
ary::printScr();
|
ary::printScr();
|
||||||
pros::delay(500); // Ports config
|
pros::delay(500); // Ports config
|
||||||
|
|
||||||
@ -36,9 +23,9 @@ void initialize() {
|
|||||||
Add autonomous paths to the auto selection
|
Add autonomous paths to the auto selection
|
||||||
*/
|
*/
|
||||||
ary::autonselector::auton_selector.add_autons({
|
ary::autonselector::auton_selector.add_autons({
|
||||||
|
Auton("Six triball\n\nThey ain't believe in us\nBut GOD DID :speaking_head:", six_triball),
|
||||||
Auton("Far side \n\nFar from alliance goal", near_side),
|
Auton("Far side \n\nFar from alliance goal", near_side),
|
||||||
Auton("Near side (far from alliance goal) \n\nCLOSE TO ALLIANCE GOAL", far_side),
|
Auton("Near side (far from alliance goal) \n\nCLOSE TO ALLIANCE GOAL", far_side),
|
||||||
Auton("Six triball\n\nThey ain't believe in us\nBut GOD DID :speaking_head:", six_triball),
|
|
||||||
Auton("Skills \n\ncloudabunga", skills)
|
Auton("Skills \n\ncloudabunga", skills)
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -49,22 +36,21 @@ void initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void disabled() {
|
void disabled() {
|
||||||
subsystemsTask.suspend();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void competition_initialize() {}
|
void competition_initialize() {}
|
||||||
|
|
||||||
void autonomous() {
|
void autonomous() {
|
||||||
subsystemsTask.resume();
|
|
||||||
autonomousResets();
|
autonomousResets();
|
||||||
ary::autonselector::auton_selector.call_selected_auton();
|
ary::autonselector::auton_selector.call_selected_auton();
|
||||||
}
|
}
|
||||||
|
|
||||||
void opcontrol() {
|
void opcontrol() {
|
||||||
subsystemsTask.resume();
|
|
||||||
disableActiveBrake();
|
disableActiveBrake();
|
||||||
opControlInit(); // Configure the chassis for driver control
|
opControlInit(); // Configure the chassis for driver control
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
globals::chassis.tank_control();
|
globals::chassis.tank_control();
|
||||||
|
renu_control();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user