more fixes and stuff
This commit is contained in:
parent
780ecedcdf
commit
08bdcc9ba6
@ -49,7 +49,7 @@ namespace superstruct {
|
|||||||
/* Structure */
|
/* Structure */
|
||||||
void togglePto(bool toggle);
|
void togglePto(bool toggle);
|
||||||
void runCata(double inpt);
|
void runCata(double inpt);
|
||||||
void runAntiBlock(double inpt);
|
void runIntake(double inpt);
|
||||||
void subsysControl(pros::controller_digital_e_t ptoToggleButton, pros::controller_digital_e_t cataRunButton, pros::controller_digital_e_t intakeButton, pros::controller_digital_e_t outtakeButton);
|
void subsysControl(pros::controller_digital_e_t ptoToggleButton, pros::controller_digital_e_t cataRunButton, pros::controller_digital_e_t intakeButton, pros::controller_digital_e_t outtakeButton);
|
||||||
void wingsControl(pros::controller_digital_e_t wingControlButton);
|
void wingsControl(pros::controller_digital_e_t wingControlButton);
|
||||||
|
|
||||||
|
|||||||
@ -11,8 +11,9 @@ using namespace superstruct;
|
|||||||
*/
|
*/
|
||||||
void near_side() {
|
void near_side() {
|
||||||
// Score the triball preload
|
// Score the triball preload
|
||||||
|
togglePto(true);
|
||||||
// INTAKE PLACEHOLDER -> IN
|
// INTAKE PLACEHOLDER -> IN
|
||||||
|
runIntake(-12000);
|
||||||
driveSync(90, true);
|
driveSync(90, true);
|
||||||
turnSync(90);
|
turnSync(90);
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ namespace globals {
|
|||||||
|
|
||||||
pros::Motor motor_tlf(14, MOTOR_GEARSET_06, false);
|
pros::Motor motor_tlf(14, MOTOR_GEARSET_06, false);
|
||||||
pros::Motor motor_blb(9, MOTOR_GEARSET_06, true);
|
pros::Motor motor_blb(9, MOTOR_GEARSET_06, true);
|
||||||
pros::Motor motor_blf(3, MOTOR_GEARSET_06, true);
|
pros::Motor motor_blf(2, MOTOR_GEARSET_06, true);
|
||||||
pros::Motor motor_tlb(7, MOTOR_GEARSET_06, false);
|
pros::Motor motor_tlb(7, MOTOR_GEARSET_06, false);
|
||||||
pros::Motor motor_trf(15, MOTOR_GEARSET_06, true);
|
pros::Motor motor_trf(15, MOTOR_GEARSET_06, true);
|
||||||
pros::Motor motor_trb(6, MOTOR_GEARSET_06, true);
|
pros::Motor motor_trb(6, MOTOR_GEARSET_06, true);
|
||||||
@ -41,7 +41,7 @@ namespace globals {
|
|||||||
Timer timer;
|
Timer timer;
|
||||||
|
|
||||||
Drive chassis(
|
Drive chassis(
|
||||||
{14, -9, -3, 7},
|
{14, -9, -2, 7},
|
||||||
{-15, 12, 5, -6},
|
{-15, 12, 5, -6},
|
||||||
18,
|
18,
|
||||||
WHEEL_SIZE,
|
WHEEL_SIZE,
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
using namespace ary;
|
using namespace ary;
|
||||||
using namespace globals;
|
using namespace globals;
|
||||||
|
|
||||||
bool ptoEnabled = true;
|
bool ptoEnabled = false;
|
||||||
bool wingsOpen = false;
|
bool wingsOpen = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -157,15 +157,15 @@ namespace superstruct {
|
|||||||
|
|
||||||
void runCata(double inpt) {
|
void runCata(double inpt) {
|
||||||
if (!ptoEnabled) return;
|
if (!ptoEnabled) return;
|
||||||
cata_mtr = inpt;
|
cata_mtr.move_voltage(inpt);
|
||||||
}
|
}
|
||||||
|
|
||||||
void runIntake(double inpt) {
|
void runIntake(double inpt) {
|
||||||
if (!ptoEnabled) return;
|
if (!ptoEnabled) return;
|
||||||
intake_mtr = inpt;
|
intake_mtr.move_voltage(inpt);
|
||||||
}
|
}
|
||||||
|
|
||||||
int lock = 1;
|
int lock = 0;
|
||||||
void subsysControl(pros::controller_digital_e_t ptoToggleButton, pros::controller_digital_e_t cataRunButton, pros::controller_digital_e_t intakeButton, pros::controller_digital_e_t outtakeButton) {
|
void subsysControl(pros::controller_digital_e_t ptoToggleButton, pros::controller_digital_e_t cataRunButton, pros::controller_digital_e_t intakeButton, pros::controller_digital_e_t outtakeButton) {
|
||||||
if (globals::master.get_digital(ptoToggleButton) && lock == 0) { // If the PTO button has been pressed and the PTO is not engaged
|
if (globals::master.get_digital(ptoToggleButton) && lock == 0) { // If the PTO button has been pressed and the PTO is not engaged
|
||||||
togglePto(!ptoEnabled); // Toggle the PTO so that cataput is useable
|
togglePto(!ptoEnabled); // Toggle the PTO so that cataput is useable
|
||||||
@ -185,7 +185,7 @@ namespace superstruct {
|
|||||||
} else if (globals::master.get_digital(outtakeButton)) {
|
} else if (globals::master.get_digital(outtakeButton)) {
|
||||||
runIntake(12000);
|
runIntake(12000);
|
||||||
} else {
|
} else {
|
||||||
runIntake(-25);
|
runIntake(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user