mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpilibjexamples] Remove unnecessary voltage desaturation
This commit is contained in:
committed by
Peter Johnson
parent
2fa52007af
commit
a4ec13eb0e
@@ -194,11 +194,6 @@ public class DriveSubsystem extends SubsystemBase {
|
||||
* @param rightVolts the commanded right output
|
||||
*/
|
||||
public void tankDriveVolts(double leftVolts, double rightVolts) {
|
||||
var batteryVoltage = RobotController.getBatteryVoltage();
|
||||
if (Math.max(Math.abs(leftVolts), Math.abs(rightVolts)) > batteryVoltage) {
|
||||
leftVolts *= batteryVoltage / 12.0;
|
||||
rightVolts *= batteryVoltage / 12.0;
|
||||
}
|
||||
m_leftMotors.setVoltage(leftVolts);
|
||||
m_rightMotors.setVoltage(rightVolts);
|
||||
m_drive.feed();
|
||||
|
||||
Reference in New Issue
Block a user