half n half (sunjoy delicious)
This commit is contained in:
parent
9a60ace03c
commit
0da3ed162d
@ -12,7 +12,6 @@ using namespace superstruct;
|
|||||||
void near_side() {
|
void near_side() {
|
||||||
// Score the triball preload
|
// Score the triball preload
|
||||||
togglePto(true);
|
togglePto(true);
|
||||||
// INTAKE PLACEHOLDER -> IN
|
|
||||||
runIntake(-12000);
|
runIntake(-12000);
|
||||||
driveSync(90, true);
|
driveSync(90, true);
|
||||||
turnSync(90);
|
turnSync(90);
|
||||||
|
|||||||
@ -5,10 +5,34 @@ using namespace superstruct;
|
|||||||
|
|
||||||
e_controlsch currentuser = RENU;
|
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() {
|
void initialize() {
|
||||||
controlTask.suspend();
|
subsystemsTask.suspend();
|
||||||
ary::printScr();
|
ary::printScr();
|
||||||
pros::delay(500); // Ports config
|
pros::delay(500); // Ports config
|
||||||
|
|
||||||
@ -38,40 +62,18 @@ void initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void disabled() {
|
void disabled() {
|
||||||
controlTask.suspend();
|
subsystemsTask.suspend();
|
||||||
}
|
}
|
||||||
void competition_initialize() {}
|
void competition_initialize() {}
|
||||||
|
|
||||||
void autonomous() {
|
void autonomous() {
|
||||||
controlTask.resume();
|
subsystemsTask.resume();
|
||||||
autonomousResets();
|
autonomousResets();
|
||||||
ary::autonselector::auton_selector.call_selected_auton();
|
ary::autonselector::auton_selector.call_selected_auton();
|
||||||
}
|
}
|
||||||
|
|
||||||
void opcontrol() {
|
void opcontrol() {
|
||||||
controlTask.resume();
|
subsystemsTask.resume();
|
||||||
disableActiveBrake();
|
disableActiveBrake();
|
||||||
opControlInit(); // Configure the chassis for driver control
|
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user