mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[artf3717] Added isEnabled to Teleop Loops in Samples.
Anywhere in the sample programs where there was just a isOperatorControl() in the while loop for Teleop, added an "&& isEnabled()". Change-Id: Ib81e8bab79923e262c314a073a591855cbf06846
This commit is contained in:
@@ -31,7 +31,7 @@ public:
|
||||
* Runs the motor from the output of a Joystick.
|
||||
*/
|
||||
void OperatorControl() {
|
||||
while (IsOperatorControl()) {
|
||||
while (IsOperatorControl() && IsEnabled()) {
|
||||
// Set the motor controller's output.
|
||||
// This takes a number from -1 (100% speed in reverse) to +1 (100% speed forwards).
|
||||
m_motor.Set(m_stick.GetY());
|
||||
|
||||
Reference in New Issue
Block a user