[wpilib] Add DeadbandElimination forwarding to PWMMotorController (#3714)

This commit is contained in:
sciencewhiz
2021-11-09 21:24:47 -08:00
committed by GitHub
parent 3be0c1217a
commit 4d78def31e
3 changed files with 25 additions and 0 deletions

View File

@@ -104,6 +104,17 @@ public abstract class PWMMotorController extends MotorSafety
return m_pwm.getChannel();
}
/**
* Optionally eliminate the deadband from a motor controller.
*
* @param eliminateDeadband If true, set the motor curve for the motor controller to eliminate the
* deadband in the middle of the range. Otherwise, keep the full range without modifying any
* values.
*/
public void enableDeadbandElimination(boolean eliminateDeadband) {
m_pwm.enableDeadbandElimination(eliminateDeadband);
}
@Override
public void initSendable(SendableBuilder builder) {
builder.setSmartDashboardType("Motor Controller");