Skip to content
This repository was archived by the owner on May 9, 2025. It is now read-only.

Commit 555e311

Browse files
committed
refactor(drivetrain): Removes static property initiator out of drivetrain object constructor
This commit also creates a custom keybind for running intake-only.
1 parent 9972993 commit 555e311

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ void opcontrol() {
200200
pros::Task move([&]() { subsystem.ladybrown.MoveToPoint(LadyBrown::ATTACK_STATE); }, "LadyBrownMove");
201201
}
202202

203+
if (controller.get_digital_new_press(pros::E_CONTROLLER_DIGITAL_X)) {
204+
IntakeMotor.move_velocity(600);
205+
}
206+
207+
203208

204209
subsystem.drivetrain.run();
205210
subsystem.latch.run();

src/subsystems/drivetrain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Drivetrain::DRIVE_MODE Drivetrain::driveMode = CURVATURE_DRIVE;
99

1010
bool Drivetrain::isReversed = false;
1111

12-
Drivetrain::Drivetrain() { Drivetrain::driveMode = CURVATURE_DRIVE; }
12+
Drivetrain::Drivetrain() {}
1313

1414
void Drivetrain::CurvatureDrive() {
1515
int left = controller.get_analog(pros::E_CONTROLLER_ANALOG_LEFT_Y);

0 commit comments

Comments
 (0)