Fix C++ POVButton (#2294)

Also add unit test.
This commit is contained in:
Peter Johnson
2020-01-20 21:35:19 -08:00
committed by GitHub
parent d0cf4e8882
commit b9b31069cc
2 changed files with 48 additions and 1 deletions

View File

@@ -28,7 +28,7 @@ class POVButton : public Button {
*/
POVButton(frc::GenericHID* joystick, int angle, int povNumber = 0)
: Button([joystick, angle, povNumber] {
joystick->GetPOV(povNumber) == angle;
return joystick->GetPOV(povNumber) == angle;
}) {}
};
} // namespace frc2