mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-30 02:31:44 +00:00
SafePWM: Rename Feed to feed (#463)
Add a deprecated shim to avoid breaking any user code using Feed.
This commit is contained in:
committed by
Peter Johnson
parent
b07782cd89
commit
2ee8ba9361
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user