Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Absozero authored Jan 20, 2024
1 parent 0d239d5 commit 0eb72cf
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,19 @@ void displayLocation() {
}

void displayHi() {
while (true) { // get the current position of the robot
pros::lcd::print(0, "Hello PROS!"); // print the x position// print the heading
while (true) {
std::vector<double> positions = drive_.get_positions(); // get the current position of the robot
pros::lcd::print(1, "");
pros::lcd::print(1, ": %f", pose.y); // print the x position// print the heading
pros::delay(10);
}
}

void displayBye() {
while (true) {
std::vector<double> positions = drive_.get_positions(); // get the current position of the robot
pros::lcd::print(1, "");
pros::lcd::print(1, ": %f", pose.y); // print the x position// print the heading
pros::delay(10);
}
}
Expand Down Expand Up @@ -228,6 +239,7 @@ void autonomous() {
else {
drive_.move_velocity(150);
pros::delay(2000);
drive_.brake();
drive_right.move_velocity(180);
pros::delay(400);
drive_.move_velocity(170);
Expand All @@ -249,8 +261,10 @@ void autonomous() {
else {
drive_.move_velocity(150);
pros::delay(2000);
drive_.brake();
drive_right.move_velocity(180);
pros::delay(400);
drive_right.brake();
drive_.move_velocity(170);
pros::delay(3000);
}
Expand Down

0 comments on commit 0eb72cf

Please sign in to comment.