more stuff

This commit is contained in:
ary 2023-10-27 06:47:11 -05:00
parent 65d7d24a62
commit 47d99fec52
3 changed files with 11 additions and 1 deletions

View File

@ -528,6 +528,12 @@ class Drive {
*/
void set_drive(double target, int speed, bool slew_on = false, bool toggle_heading = true);
/*
Stops movement on the drivetrain
*/
void stop_drive(Drive& chassis);
/**
* Drives the robot forward using a trapezoidal motional profile
*

View File

@ -288,6 +288,10 @@ void Drive::imu_loading_display(int iter) {
}
}
void Drive::stop_drive(Drive& chassis) {
chassis.set_tank(0, 0);
}
bool Drive::imu_calibrate(bool run_loading_animation) {
imu.reset();
int iter = 0;

View File

@ -129,7 +129,7 @@ void set_profiled_drive(Drive& chassis, double target, int endTimeout) {
pros::delay(10);
}
chassis.set_tank(0, 0);
chassis.set_tank(0, 0); // Stop the drive
chassis.set_drive_brake(MOTOR_BRAKE_BRAKE);
pros::delay(endTimeout);