Skip to content

Commit da7e6de

Browse files
authored
Fix LiveWindow code snippet for static method (#1696)
Update code snipped to reflect the fact `LiveWindow` does not have a `getInstance` method, and `setEnabled` is just a static method. ``` /** * Set the enabled state of LiveWindow. * * <p>If it's being enabled, turn off the scheduler and remove all the commands from the queue and * enable all the components registered for LiveWindow. If it's being disabled, stop all the * registered components and reenable the scheduler. * * <p>TODO: add code to disable PID loops when enabling LiveWindow. The commands should reenable * the PID loops themselves when they get rescheduled. This prevents arms from starting to move * around, etc. after a period of adjusting them in LiveWindow mode. * * @param enabled True to enable LiveWindow. */ public static synchronized void setEnabled(boolean enabled) { ```
1 parent 4bea8b1 commit da7e6de

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/docs/software/basic-programming/using-test-mode.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ When in test mode, the ``testInit`` method is run once, and the testPeriodic met
2323

2424
Adding test mode can be as painless as calling your already written Teleop methods from Test. Or you can write special code to try out a new feature that is only run in Test mode, before integrating it into your teleop or autonomous code. You could even write code to move all motors and check all sensors to help the pit crew!
2525

26-
.. warning:: If you write your own test code, it may interfere with the LiveWindow code that can control actuators and is enabled automatically. You may need to call ``LiveWindow.getInstance().setEnabled(false)`` in your testInit method to avoid this.
26+
.. warning:: If you write your own test code, it may interfere with the LiveWindow code that can control actuators and is enabled automatically. You may need to call ``LiveWindow.setEnabled(false)`` in your testInit method to avoid this.

0 commit comments

Comments
 (0)