Skip to content

Commit

Permalink
Fix reference to InterruptOn (#603)
Browse files Browse the repository at this point in the history
Fixes #566
  • Loading branch information
sciencewhiz committed Apr 5, 2020
1 parent d84536f commit d3c1fcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/docs/software/commandbased/convenience-features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -376,12 +376,12 @@ The ``withInterrupt()`` (`Java <https://first.wpi.edu/FRC/roborio/release/docs/j
.. code-tab:: java

// Will be interrupted if m_limitSwitch.get() returns true
button.whenPressed(command.interruptOn(m_limitSwitch::get));
button.whenPressed(command.withInterrupt(m_limitSwitch::get));

.. code-tab:: c++

// Will be interrupted if m_limitSwitch.get() returns true
button.WhenPressed(command.InterruptOn([&m_limitSwitch] { return m_limitSwitch.Get(); }));
button.WhenPressed(command.WithInterrupt([&m_limitSwitch] { return m_limitSwitch.Get(); }));

whenFinished
^^^^^^^^^^^^
Expand Down

0 comments on commit d3c1fcd

Please sign in to comment.