mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpilib] Rename MotorController setDutyCycle() to setThrottle() (#8720)
Fixes #8716.
This commit is contained in:
@@ -92,10 +92,10 @@ ExpansionHubMotor::~ExpansionHubMotor() noexcept {
|
||||
m_hub.UnreserveMotor(m_channel);
|
||||
}
|
||||
|
||||
void ExpansionHubMotor::SetDutyCycle(double dutyCycle) {
|
||||
void ExpansionHubMotor::SetThrottle(double throttle) {
|
||||
SetEnabled(true);
|
||||
m_modePublisher.Set(kPercentageMode);
|
||||
m_setpointPublisher.Set(dutyCycle);
|
||||
m_setpointPublisher.Set(throttle);
|
||||
}
|
||||
|
||||
void ExpansionHubMotor::SetVoltage(wpi::units::volt_t voltage) {
|
||||
|
||||
Reference in New Issue
Block a user