Closed TroyNeubauer closed 4 years ago
I added a new button class that puts all the lambdas we had into a nice class.
class Button : public frc2::Button { public: Button(frc::Joystick& stick, int id) : frc2::Button([&] { return stick.GetRawButton(id); }) {} };
Its usage can be seen here: https://github.com/CougarProgramming623/InfiniteRecharge/blob/72de203b6dc0bd501fb624d8a097082a0f042280/src/main/cpp/subsystems/Intake.cpp#L16
Also don't merge until this is tested
I added a new button class that puts all the lambdas we had into a nice class.
class Button : public frc2::Button { public: Button(frc::Joystick& stick, int id) : frc2::Button([&] { return stick.GetRawButton(id); }) {} };
Its usage can be seen here: https://github.com/CougarProgramming623/InfiniteRecharge/blob/72de203b6dc0bd501fb624d8a097082a0f042280/src/main/cpp/subsystems/Intake.cpp#L16