[wpilib] Fix Compressor sendable properties (#3269)

This commit is contained in:
Prateek Machiraju
2021-03-27 00:20:54 -04:00
committed by GitHub
parent 10c038d9bf
commit ffb590bfcc
2 changed files with 6 additions and 17 deletions

View File

@@ -236,14 +236,10 @@ int Compressor::GetModule() const {
void Compressor::InitSendable(SendableBuilder& builder) {
builder.SetSmartDashboardType("Compressor");
builder.AddBooleanProperty(
"Enabled", [=]() { return Enabled(); },
[=](bool value) {
if (value) {
Start();
} else {
Stop();
}
});
"Closed Loop Control", [=]() { return GetClosedLoopControl(); },
[=](bool value) { SetClosedLoopControl(value); });
builder.AddBooleanProperty(
"Enabled", [=] { return Enabled(); }, nullptr);
builder.AddBooleanProperty(
"Pressure switch", [=]() { return GetPressureSwitchValue(); }, nullptr);
}