You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
When debugging, sometimes you don't want the drive motors to move, but you want the PID to calculate. Also when debugging something else, sometimes you don't want the drive prints to print.
Describe the solution you'd like
A new function should toggle the drive motors off in autonomous, and another for disabling the autonomous prints.
The text was updated successfully, but these errors were encountered:
Two new functions were added, chassis.toggle_auto_drive(bool toggle) and chassis.toggle_auto_print(bool toggle), where true enables and false disables. These are both defaulted to true.
This example would run drive PID to move 24 inches, but the motors wouldn't move. This can be useful for debugging.
voidautonomous() {
chassis.reset_gyro(); // Reset gyro position to 0
chassis.reset_drive_sensor(); // Reset drive sensors to 0
chassis.set_drive_brake(MOTOR_BRAKE_HOLD); // Set motors to hold. This helps autonomous consistency.
chassis.toggle_auto_drive(false);
chassis.set_drive_pid(24, 110);
while (true) {
printf(" Left Error: %f Right Error: %f", chassis.leftPID.error, chassis.rightPID.error);
}
}
This example runs the drive but doesn't print anything. This can be useful for debugging other subsystems to avoid clutter in terminal.
voidautonomous() {
chassis.reset_gyro(); // Reset gyro position to 0
chassis.reset_drive_sensor(); // Reset drive sensors to 0
chassis.set_drive_brake(MOTOR_BRAKE_HOLD); // Set motors to hold. This helps autonomous consistency.
chassis.toggle_auto_print(false);
chassis.set_drive_pid(24, 110);
chassis.wait_drive();
}
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
When debugging, sometimes you don't want the drive motors to move, but you want the PID to calculate. Also when debugging something else, sometimes you don't want the drive prints to print.
Describe the solution you'd like
A new function should toggle the drive motors off in autonomous, and another for disabling the autonomous prints.
The text was updated successfully, but these errors were encountered: