half n half (sunjoy delicious)

This commit is contained in:
ary 2023-12-07 08:25:40 -05:00
parent 9a60ace03c
commit 0da3ed162d
2 changed files with 30 additions and 29 deletions

View File

@ -12,7 +12,6 @@ using namespace superstruct;
void near_side() {
// Score the triball preload
togglePto(true);
// INTAKE PLACEHOLDER -> IN
runIntake(-12000);
driveSync(90, true);
turnSync(90);

View File

@ -5,10 +5,34 @@ using namespace superstruct;
e_controlsch currentuser = RENU;
pros::Task controlTask(renu_control);
void taskMethods() {
while (true) {
/*
Handle controls for whoever is driving the bot at the moment, each available user a respective set of controls
Available Options:
RENU, RIA, CHRIS
*/
if (currentuser == RENU) {
chassis.tank_control();
renu_control();
} else if (currentuser == RIA) {
chassis.tank_control();
renu_control();
} else if (currentuser == CHRIS) {
chassis.arcade_standard(ary::SINGLE, ary::DEFAULT);
chris_control();
} else {
renu_control();
}
pros::delay(ary::util::DELAY_TIME);
}
}
pros::Task subsystemsTask(taskMethods);
void initialize() {
controlTask.suspend();
subsystemsTask.suspend();
ary::printScr();
pros::delay(500); // Ports config
@ -38,40 +62,18 @@ void initialize() {
}
void disabled() {
controlTask.suspend();
subsystemsTask.suspend();
}
void competition_initialize() {}
void autonomous() {
controlTask.resume();
subsystemsTask.resume();
autonomousResets();
ary::autonselector::auton_selector.call_selected_auton();
}
void opcontrol() {
controlTask.resume();
subsystemsTask.resume();
disableActiveBrake();
opControlInit(); // Configure the chassis for driver control
while (true) {
/*
Handle controls for whoever is driving the bot at the moment, each available user a respective set of controls
Available Options:
RENU, RIA, CHRIS
*/
if (currentuser == RENU) {
chassis.tank_control();
renu_control();
} else if (currentuser == RIA) {
chassis.tank_control();
renu_control();
} else if (currentuser == CHRIS) {
chassis.arcade_standard(ary::SINGLE, ary::DEFAULT);
chris_control();
} else {
renu_control();
}
pros::delay(ary::util::DELAY_TIME);
}
}