[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:
James Kuszmaul
2014-10-27 15:52:37 -04:00
parent 5b2520c35f
commit 767686ae2e
13 changed files with 13 additions and 13 deletions

View File

@@ -40,7 +40,7 @@ public:
void OperatorControl()
{
myRobot.SetSafetyEnabled(true);
while (IsOperatorControl())
while (IsOperatorControl() && IsEnabled())
{
myRobot.ArcadeDrive(stick); // drive with arcade style (use right stick)
Wait(0.005); // wait for a motor update time