Made SpeedController class organization consistent between languages (#568)

This commit is contained in:
Tyler Veness
2017-07-09 22:43:56 -04:00
committed by Peter Johnson
parent 97437ee58b
commit 822ea6abc8
5 changed files with 32 additions and 59 deletions

View File

@@ -36,36 +36,19 @@ void PWMSpeedController::Set(double speed) {
*/
double PWMSpeedController::Get() const { return GetSpeed(); }
/**
* Common interface for disabling a motor.
*/
void PWMSpeedController::Disable() { SetDisabled(); }
/**
* Common interface for inverting direction of a speed controller.
*
* @param isInverted The state of inversion, true is inverted.
*/
void PWMSpeedController::SetInverted(bool isInverted) {
m_isInverted = isInverted;
}
/**
* Common interface for the inverting direction of a speed controller.
*
* @return isInverted The state of inversion, true is inverted.
*
*/
bool PWMSpeedController::GetInverted() const { return m_isInverted; }
void PWMSpeedController::Disable() { SetDisabled(); }
void PWMSpeedController::StopMotor() { SafePWM::StopMotor(); }
/**
* Write out the PID value as seen in the PIDOutput base object.
*
* @param output Write out the PWM value as was found in the PIDController
*/
void PWMSpeedController::PIDWrite(double output) { Set(output); }
/**
* Common interface to stop the motor until Set is called again.
*/
void PWMSpeedController::StopMotor() { this->SafePWM::StopMotor(); }