mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[examples] Fix negations in event loop examples (#4334)
This commit is contained in:
@@ -40,7 +40,7 @@ class Robot : public frc::TimedRobot {
|
||||
.IfHigh([&intake = m_intake] { intake.Set(0.5); });
|
||||
|
||||
// if the thumb button is not held
|
||||
(intakeButton
|
||||
(!intakeButton
|
||||
// or there is a ball in the kicker
|
||||
|| isBallAtKicker)
|
||||
// stop the intake
|
||||
@@ -59,7 +59,7 @@ class Robot : public frc::TimedRobot {
|
||||
ff.Calculate(SHOT_VELOCITY));
|
||||
});
|
||||
// if not, stop
|
||||
shootTrigger.IfHigh([&shooter = m_shooter] { shooter.Set(0.0); });
|
||||
(!shootTrigger).IfHigh([&shooter = m_shooter] { shooter.Set(0.0); });
|
||||
|
||||
frc::BooleanEvent atTargetVelocity =
|
||||
frc::BooleanEvent(
|
||||
|
||||
Reference in New Issue
Block a user