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:
Tyler Veness
2018-11-22 21:15:26 -08:00
committed by Peter Johnson
parent df347e3d80
commit acb786a791
39 changed files with 710 additions and 1023 deletions

View File

@@ -73,7 +73,7 @@ void KilloughDrive::DriveCartesian(double ySpeed, double xSpeed,
m_rightMotor.Set(wheelSpeeds[kRight] * m_maxOutput);
m_backMotor.Set(wheelSpeeds[kBack] * m_maxOutput);
m_safetyHelper.Feed();
Feed();
}
void KilloughDrive::DrivePolar(double magnitude, double angle,
@@ -92,7 +92,7 @@ void KilloughDrive::StopMotor() {
m_leftMotor.StopMotor();
m_rightMotor.StopMotor();
m_backMotor.StopMotor();
m_safetyHelper.Feed();
Feed();
}
void KilloughDrive::GetDescription(wpi::raw_ostream& desc) const {