[wpilib] Remove unhelpful comments from BooleanEvent (#7970)

These were apparently a meme about state being hard to manage rather
than a statement about the code itself. I spent a while trying to find
some complex logic this comment was alluding to that would indicate why
it's "a nightmare to manage".
This commit is contained in:
Tyler Veness
2025-05-12 07:19:54 -07:00
committed by GitHub
parent dd6c830768
commit cc8eaf3ed7
2 changed files with 6 additions and 2 deletions

View File

@@ -129,8 +129,12 @@ class BooleanEvent {
frc::Debouncer::DebounceType::kRising);
private:
/// Poller loop.
EventLoop* m_loop;
std::function<bool()> m_signal;
std::shared_ptr<bool> m_state; // A programmer's worst nightmare.
/// The state of the condition in the current loop poll.
std::shared_ptr<bool> m_state;
};
} // namespace frc

View File

@@ -28,7 +28,7 @@ public class BooleanEvent implements BooleanSupplier {
private final BooleanSupplier m_signal;
/** The state of the condition in the current loop poll. Nightmare to manage. */
/** The state of the condition in the current loop poll. */
private final AtomicBoolean m_state = new AtomicBoolean(false);
/**