mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
PWM: Use getRaw and setRaw for Sendable "Value" property. (#963)
Also change type to "PWM". Move old PWM Sendable behavior for both value and type to PWMSpeedController.
This commit is contained in:
@@ -311,8 +311,8 @@ void PWM::SetZeroLatch() {
|
||||
}
|
||||
|
||||
void PWM::InitSendable(SendableBuilder& builder) {
|
||||
builder.SetSmartDashboardType("Speed Controller");
|
||||
builder.SetSmartDashboardType("PWM");
|
||||
builder.SetSafeState([=]() { SetDisabled(); });
|
||||
builder.AddDoubleProperty("Value", [=]() { return GetSpeed(); },
|
||||
[=](double value) { SetSpeed(value); });
|
||||
builder.AddDoubleProperty("Value", [=]() { return GetRaw(); },
|
||||
[=](double value) { SetRaw(value); });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user