mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Made SpeedController class organization consistent between languages (#568)
This commit is contained in:
committed by
Peter Johnson
parent
97437ee58b
commit
822ea6abc8
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user