mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Remove MotorSafetyHelper, create MotorSafety base class instead (#562)
Most of the MotorSafety implementation was moved into the MotorSafety base class. SafePWM's inheritance of MotorSafety was moved into PWM to eliminate Java needing a helper class. In Java, a helper class for Sendable (SendableImpl) was added due to lack of multiple inheritance.
This commit is contained in:
committed by
Peter Johnson
parent
df347e3d80
commit
acb786a791
@@ -70,7 +70,7 @@ void MecanumDrive::DriveCartesian(double ySpeed, double xSpeed,
|
||||
m_rearRightMotor.Set(wheelSpeeds[kRearRight] * m_maxOutput *
|
||||
m_rightSideInvertMultiplier);
|
||||
|
||||
m_safetyHelper.Feed();
|
||||
Feed();
|
||||
}
|
||||
|
||||
void MecanumDrive::DrivePolar(double magnitude, double angle,
|
||||
@@ -98,7 +98,7 @@ void MecanumDrive::StopMotor() {
|
||||
m_frontRightMotor.StopMotor();
|
||||
m_rearLeftMotor.StopMotor();
|
||||
m_rearRightMotor.StopMotor();
|
||||
m_safetyHelper.Feed();
|
||||
Feed();
|
||||
}
|
||||
|
||||
void MecanumDrive::GetDescription(wpi::raw_ostream& desc) const {
|
||||
|
||||
Reference in New Issue
Block a user