You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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) {
```
Copy file name to clipboardExpand all lines: source/docs/software/basic-programming/using-test-mode.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,4 +23,4 @@ When in test mode, the ``testInit`` method is run once, and the testPeriodic met
23
23
24
24
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!
25
25
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