mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[hal] Unify PWM simulation Speed, Position, and Raw (#5277)
Setting one will set the others, like it does in real hardware. Add tests for boundary conditions and conversions. Update PWM sendable implementation to include all forms. Fixes #5264 Fixes #3606
This commit is contained in:
@@ -253,5 +253,7 @@ public class PWM implements Sendable, AutoCloseable {
|
||||
builder.setSafeState(this::setDisabled);
|
||||
builder.addDoubleProperty(
|
||||
"Value", this::getPulseTimeMicroseconds, value -> setPulseTimeMicroseconds((int) value));
|
||||
builder.addDoubleProperty("Speed", this::getSpeed, this::setSpeed);
|
||||
builder.addDoubleProperty("Position", this::getPosition, this::setPosition);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user