did some stuff
This commit is contained in:
parent
f1b1603d6e
commit
80d84aeae2
@ -58,24 +58,23 @@ void near_side() {
|
|||||||
far from our alliance goal.
|
far from our alliance goal.
|
||||||
*/
|
*/
|
||||||
void far_side() {
|
void far_side() {
|
||||||
wings.open(); // Prepare for removal of match load triball
|
driveSync(-30, true);
|
||||||
//toggleIntake(true); // Secure preload triball
|
rightSwing(45);
|
||||||
|
driveSync(-33, true);
|
||||||
// Drive forward to removal match load triball with wings, close wings immediately
|
driveSync(23, true);
|
||||||
driveSync(30, true);
|
rightSwing(0);
|
||||||
|
wings.open();
|
||||||
|
driveSync(40, true);
|
||||||
wings.close();
|
wings.close();
|
||||||
|
|
||||||
//Score the preload
|
turnSync(-94);
|
||||||
turnSync(40);
|
driveSync(40, true);
|
||||||
//toggleIntake(false);
|
turnSync(-45);
|
||||||
driveSync(35, true);
|
driveSync(35, true);
|
||||||
driveSync(-10, true);
|
wings.open();
|
||||||
|
turnSync(-58);
|
||||||
|
|
||||||
|
|
||||||
//Turn towards the elevation bar area
|
|
||||||
turnSync(135);
|
|
||||||
driveSync(90, true);
|
|
||||||
wings.open(); // Open our wings as they are being used to contact the bar
|
|
||||||
turnSync(120);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void four_triball_contact() {
|
void four_triball_contact() {
|
||||||
@ -166,12 +165,8 @@ void five_triball_remove() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void skills() {
|
void skills() {
|
||||||
//toggleIntake(true);
|
|
||||||
driveSync(10, true);
|
driveSync(10, true);
|
||||||
//toggleIntake(false);
|
|
||||||
turnSync(45);
|
turnSync(45);
|
||||||
driveSync(35, true);
|
|
||||||
driveSync(-35, true);
|
|
||||||
turnSync(-60);
|
turnSync(-60);
|
||||||
driveSync(10, true);
|
driveSync(10, true);
|
||||||
wings.open();
|
wings.open();
|
||||||
@ -179,7 +174,7 @@ void skills() {
|
|||||||
togglePto(true);
|
togglePto(true);
|
||||||
pros::delay(100);
|
pros::delay(100);
|
||||||
timer.reset();
|
timer.reset();
|
||||||
while (timer.getElapsedTimeMS() < 35000) {
|
while (timer.getElapsedTimeMS() < 31500) {
|
||||||
motor_trb.move_voltage(-12000);
|
motor_trb.move_voltage(-12000);
|
||||||
}
|
}
|
||||||
motor_trb.move_voltage(0); // i hate my life
|
motor_trb.move_voltage(0); // i hate my life
|
||||||
@ -187,12 +182,51 @@ void skills() {
|
|||||||
|
|
||||||
wings.close();
|
wings.close();
|
||||||
|
|
||||||
driveSync(-35, true);
|
turnSync(0);
|
||||||
turnSync(10);
|
driveSync(-28.5, true);
|
||||||
driveSync(-40, true);
|
turnSync(-45);
|
||||||
|
driveSync(-140, true);
|
||||||
|
leftSwing(-90);
|
||||||
|
chassis.wait_drive();
|
||||||
|
driveSync(-35, true);
|
||||||
|
leftSwing(-135);
|
||||||
|
chassis.wait_drive();
|
||||||
|
driveSync(-30, true);
|
||||||
|
driveSync(15, true);
|
||||||
|
leftSwing(-25);
|
||||||
|
chassis.wait_drive();
|
||||||
|
driveSync(62.5, true);
|
||||||
|
leftSwing(60);
|
||||||
|
chassis.wait_drive();
|
||||||
|
wings.open();
|
||||||
|
driveSync(35, true);
|
||||||
|
leftSwing(125);
|
||||||
|
chassis.wait_drive();
|
||||||
|
driveSync(40, true);
|
||||||
|
pros::delay(250);
|
||||||
|
wings.close();
|
||||||
|
driveSync(-55, true);
|
||||||
|
|
||||||
|
wings.open();
|
||||||
|
setIntakeSpeed(12000);
|
||||||
|
driveSync(47, true);
|
||||||
|
wings.close();
|
||||||
|
driveSync(-55, true);
|
||||||
|
|
||||||
|
setIntakeSpeed(0);
|
||||||
|
|
||||||
turnSync(45);
|
turnSync(45);
|
||||||
driveSync(125, true);
|
driveSync(50, true);
|
||||||
//turnSync();
|
leftSwing(-157);
|
||||||
|
chassis.wait_drive();
|
||||||
|
wings.open();
|
||||||
|
|
||||||
|
leftSwing(130);
|
||||||
|
chassis.wait_drive();
|
||||||
|
wings.open();
|
||||||
|
driveSync(40, true);
|
||||||
|
wings.close();
|
||||||
|
driveSync(-40, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void testingAsyncRunning() {
|
void testingAsyncRunning() {
|
||||||
|
|||||||
@ -24,10 +24,10 @@ void initialize() {
|
|||||||
*/
|
*/
|
||||||
ary::autonselector::auton_selector.add_autons({
|
ary::autonselector::auton_selector.add_autons({
|
||||||
Auton("Five triballl\n\nThey ain't believe in us..", five_triball_remove),
|
Auton("Five triballl\n\nThey ain't believe in us..", five_triball_remove),
|
||||||
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("Four triball contact\n\nfour triballs and then contact elevation", four_triball_contact),
|
Auton("Skills \n\nCLOUDABUNGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", skills),
|
||||||
Auton("Skills \n\nCLOUDABUNGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", skills)
|
Auton("Far side \n\nFar from alliance goal", near_side),
|
||||||
|
Auton("Four triball contact\n\nfour triballs and then contact elevation", four_triball_contact)
|
||||||
});
|
});
|
||||||
|
|
||||||
superstruct::motorsCoast();
|
superstruct::motorsCoast();
|
||||||
|
|||||||
@ -102,6 +102,7 @@ namespace superstruct
|
|||||||
void handleIntake() {
|
void handleIntake() {
|
||||||
while (true) {
|
while (true) {
|
||||||
intake_mtr.move_voltage(intakeSpeed);
|
intake_mtr.move_voltage(intakeSpeed);
|
||||||
|
pros::delay(ary::util::DELAY_TIME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,9 +195,12 @@ namespace superstruct
|
|||||||
|
|
||||||
void setIntakeSpeed(double inpt)
|
void setIntakeSpeed(double inpt)
|
||||||
{
|
{
|
||||||
if (!ptoEnabled)
|
if (!ptoEnabled) {
|
||||||
intakeSpeed = 0;
|
intakeSpeed = 0;
|
||||||
intakeSpeed = inpt;
|
} else {
|
||||||
|
intakeSpeed = inpt;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int lock = 0;
|
int lock = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user