Update autonomous
- Update routine with updated superstructure methods - Document the autonomous and functions used - Clean stuff up <3
This commit is contained in:
parent
a09e61b07f
commit
41aac7d39e
@ -7,39 +7,31 @@
|
|||||||
using namespace globals;
|
using namespace globals;
|
||||||
using namespace superstruct;
|
using namespace superstruct;
|
||||||
|
|
||||||
|
/*
|
||||||
|
chassis.wait_drive() -> Waits for the drivetrain to complete whatever movement is happening
|
||||||
|
chassis.wait_until(double measurement) -> Waits for the drivetrain to reach a certain measurement before performing the next task.
|
||||||
|
*/
|
||||||
|
|
||||||
void test_auton() {
|
void test_auton() {
|
||||||
driveChassis(107, true);
|
// Score the triball preload
|
||||||
chassis.wait_drive();
|
driveSync(107, true); // Go forward
|
||||||
|
|
||||||
driveChassis(-38, true);
|
// Get the furthest triball
|
||||||
chassis.wait_drive();
|
driveSync(-38, true); // Move away from the goal
|
||||||
|
turnSync(-99); // Turn towards the triball against the barrier
|
||||||
turnChassis(-99);
|
driveSync(95, true); // Drive towards the triball
|
||||||
chassis.wait_drive();
|
|
||||||
|
|
||||||
driveChassis(95, true);
|
|
||||||
chassis.wait_drive();
|
|
||||||
|
|
||||||
driveChassis(-10, true);
|
|
||||||
chassis.wait_drive();
|
|
||||||
|
|
||||||
turnChassis(15);
|
|
||||||
chassis.wait_drive();
|
|
||||||
|
|
||||||
driveChassis(40, true);
|
|
||||||
chassis.wait_drive();
|
|
||||||
|
|
||||||
|
// Turn towards the goal, and score the triball.
|
||||||
|
driveSync(-10, true); // Move away from the point
|
||||||
|
turnSync(15); // Turn towards the goal
|
||||||
|
driveSync(40, true); // Drive towards the goal and score the triball
|
||||||
leftSwing(60);
|
leftSwing(60);
|
||||||
chassis.wait_drive();
|
chassis.wait_drive();
|
||||||
|
|
||||||
driveChassis(-48, true);
|
//Drive backwards, turn to get the next triball off the line
|
||||||
chassis.wait_drive();
|
driveSync(-48, true); // Move away from the goal towards the nearest triball
|
||||||
|
turnChassis(-90); // Turn to the triball and intake
|
||||||
turnChassis(-90);
|
driveSync(12, true);
|
||||||
chassis.wait_drive();
|
|
||||||
|
|
||||||
driveChassis(12, true);
|
|
||||||
chassis.wait_drive();
|
|
||||||
|
|
||||||
// chassis.set_drive_pid(2, DRIVE_SPEED, false, true);
|
// chassis.set_drive_pid(2, DRIVE_SPEED, false, true);
|
||||||
// chassis.wait_drive();
|
// chassis.wait_drive();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user