Skip to content

Commit d0d978c

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 8f2165f + 333a556 commit d0d978c

File tree

1 file changed

+25
-5
lines changed
  • 2024/prototype/intake_mechanisms/src

1 file changed

+25
-5
lines changed

Diff for: 2024/prototype/intake_mechanisms/src/main.cpp

+25-5
Original file line numberDiff line numberDiff line change
@@ -260,22 +260,42 @@ void autonomous() {
260260
// // Leg 6: Driving forward to reach the wall and scoring the autonomous win point.
261261
// addTask(Q, R);
262262

263-
// This is a trajectory that
263+
// This is a trajectory that we can use for either positive or negative
264+
// corner, we will choose based on game strategy before a match
265+
//
266+
// We will use the single ring trajectory if our alliance member has a similar
267+
// ~3-point scoring auton
264268
auto singleRingRootTask = make_shared<WaitMillisecondsTask>(0);
265269
auto driveBackward = make_shared<DriveStraightTask>(-20, prototype);
266270
auto clampTask = make_shared<MobileGoalIntakeTask>(prototype, true);
267-
auto intakeTask = make_shared <IntakeMillisecondsTask>(prototype, 1000, 1);
271+
auto intakeTask = make_shared <IntakeMillisecondsTask>(prototype, 1000, -1);
268272

269-
// This trajectory's purpose is to do something else
273+
// This trajectory will be used when our alliance partner either has a
274+
// full-blown 12 point auton or no auton at all, also will depend on the other
275+
// team's history of auton points
276+
//
277+
// This trajectory works only on the positive corner
270278
auto goalRushRootTask = make_shared<WaitMillisecondsTask>(0);
271-
auto driveForward = make_shared<DriveStraightTask>(20, prototype);
279+
auto driveForward = make_shared<DriveStraightTask>(85, prototype);
272280
auto doinkerDown = make_shared<DeployDoinkerTask>(prototype, true);
281+
auto waitTask = make_shared<WaitMillisecondsTask>(500);
282+
auto driveBack = make_shared<DriveStraightTask>(-85, prototype);
283+
//auto doinkerUp = make_shared<DeployDoinkerTask>(prototype, false);
273284
// auto intakeTask = make_shared <IntakeMillisecondsTask>(prototype, 1000, 1);
274285
// auto driveBack = make_shared<DriveStraightTask>(10, prototype);
275286

287+
addTask(singleRingRootTask, driveBackward);
288+
addTask(driveBackward, clampTask);
289+
addTask(clampTask, intakeTask);
290+
291+
addTask(goalRushRootTask, driveForward);
292+
addTask(driveForward, doinkerDown);
293+
addTask(doinkerDown, waitTask);
294+
addTask(waitTask, driveBack);
276295

277296
// execute(fullAutonRootTask);
278-
execute(singleRingRootTask);
297+
execute(goalRushRootTask);
298+
// execute(singleRingRootTask);
279299
}
280300

281301
/**

0 commit comments

Comments
 (0)