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:
@@ -34,7 +34,7 @@ public:
|
||||
void OperatorControl()
|
||||
{
|
||||
robotDrive.SetSafetyEnabled(false);
|
||||
while (IsOperatorControl())
|
||||
while (IsOperatorControl() && IsEnabled())
|
||||
{
|
||||
// Use the joystick X axis for lateral movement, Y axis for forward movement, and Z axis for rotation.
|
||||
// This sample does not use field-oriented drive, so the gyro input is set to zero.
|
||||
|
||||
Reference in New Issue
Block a user