more stuff
This commit is contained in:
parent
65d7d24a62
commit
47d99fec52
@ -528,6 +528,12 @@ class Drive {
|
|||||||
*/
|
*/
|
||||||
void set_drive(double target, int speed, bool slew_on = false, bool toggle_heading = true);
|
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
|
* Drives the robot forward using a trapezoidal motional profile
|
||||||
*
|
*
|
||||||
|
|||||||
@ -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) {
|
bool Drive::imu_calibrate(bool run_loading_animation) {
|
||||||
imu.reset();
|
imu.reset();
|
||||||
int iter = 0;
|
int iter = 0;
|
||||||
|
|||||||
@ -129,7 +129,7 @@ void set_profiled_drive(Drive& chassis, double target, int endTimeout) {
|
|||||||
pros::delay(10);
|
pros::delay(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
chassis.set_tank(0, 0);
|
chassis.set_tank(0, 0); // Stop the drive
|
||||||
chassis.set_drive_brake(MOTOR_BRAKE_BRAKE);
|
chassis.set_drive_brake(MOTOR_BRAKE_BRAKE);
|
||||||
pros::delay(endTimeout);
|
pros::delay(endTimeout);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user