Skip to content

Commit d54527b

Browse files
author
Jay9971
committed
merged
1 parent 3f2ffe7 commit d54527b

File tree

2 files changed

+10
-27
lines changed

2 files changed

+10
-27
lines changed

src/subsystems/drivetrain.cpp

+9-27
Original file line numberDiff line numberDiff line change
@@ -65,41 +65,23 @@ std::string Drivetrain::toggleDrive() {
6565
}
6666

6767
// Switch the drivetrain control mode between arcade and tank drive with the down button(between 1 and 2)
68-
void Drivetrain::SwitchDrive() {
68+
std::string Drivetrain::SwitchDrive() {
6969
if(drivetrainToggleSwitch.get_new_press()) {
70-
pros::lcd::clear_line(2);
7170

7271
if (Drivetrain::driveMode == TANK_DRIVE) {
7372
Drivetrain::driveMode = CURVATURE_DRIVE;
74-
pros::lcd::set_text(2, "Drive: Curvature");
73+
std::cout << "Curvature Drive" << std::endl;
74+
return "Curvature Drive";
7575
}
76-
if (Drivetrain::driveMode == CURVATURE_DRIVE) {
76+
else if (Drivetrain::driveMode == CURVATURE_DRIVE) {
7777
Drivetrain::driveMode = ARCADE_DRIVE;
78-
pros::lcd::set_text(2, "Drive: Arcade");
78+
std::cout << "Arcade Drive" << std::endl;
79+
return "Arcade Drive";
7980
}
80-
if (Drivetrain::driveMode == ARCADE_DRIVE) {
81+
else {
8182
Drivetrain::driveMode = TANK_DRIVE;
82-
pros::lcd::set_text(2, "Drive: Tank");
83+
std::cout << "Tank Drive" << std::endl;
84+
return "Tank Drive";
8385
}
8486
}
85-
// Switch the drivetrain control mode between arcade and tank drive with the
86-
// down button(between 1 and 2)
87-
std::string Drivetrain::SwitchDrive(int drive) {
88-
Drivetrain::driveNum = drive;
89-
90-
// Return the name of the drive mode
91-
if (Drivetrain::driveNum == 0) {
92-
std::cout << "Curvature Drive" << std::endl;
93-
return "Curvature Drive";
94-
}
95-
if (Drivetrain::driveNum == 1) {
96-
std::cout << "Arcade Drive" << std::endl;
97-
return "Arcade Drive";
98-
}
99-
if (Drivetrain::driveNum == 2) {
100-
std::cout << "Tank Drive" << std::endl;
101-
return "Tank Drive";
102-
} else {
103-
return "Error";
104-
}
10587
}

src/subsystems/intake.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ using namespace Robot::Globals;
99

1010
Intake::Intake() {
1111
elevated = false;
12+
controller.print(0, 0, "Intake initialized");
1213
}
1314

1415
void Intake::score() {

0 commit comments

Comments
 (0)