SafePWM: Rename Feed to feed (#463)

Add a deprecated shim to avoid breaking any user code using Feed.
This commit is contained in:
Austin Shalit
2017-05-07 00:31:02 -04:00
committed by Peter Johnson
parent b07782cd89
commit 2ee8ba9361
2 changed files with 12 additions and 1 deletions

View File

@@ -34,7 +34,7 @@ public abstract class PWMSpeedController extends SafePWM implements SpeedControl
@Override
public void set(double speed) {
setSpeed(m_isInverted ? -speed : speed);
Feed();
feed();
}
/**

View File

@@ -75,9 +75,20 @@ public class SafePWM extends PWM implements MotorSafety {
/**
* Feed the MotorSafety timer. This method is called by the subclass motor whenever it updates its
* speed, thereby resetting the timeout value.
*
* @deprecated Use {@link #feed()} instead.
*/
@Deprecated
@SuppressWarnings("MethodName")
public void Feed() {
feed();
}
/**
* Feed the MotorSafety timer. This method is called by the subclass motor whenever it updates its
* speed, thereby resetting the timeout value.
*/
public void feed() {
m_safetyHelper.feed();
}