     else if (((delta > 0) && (delta < 180)) || 
       ((delta + 360) < 180 ))
     {
+      stillRotating = true;
       if(!currentlyMoving[motorIDX])
       {
         char* error = "Starting motor: X";

  }
  driveTimeMillis = (long)(nmc.drive_duration * 1000);
  emergencyStop = nmc.e_stop;
}



    else
    {
      currentlyDriving = false;
      char* error = "done: Stopped all motors.";
      msg.data = error;
      pubResults.publish(&msg);  
      
      stopAllMotors();
    }
  }

}

bool currentlyMoving[6];
// A function to articulate the wheels to face the desired orientation.
void articulate()
{
  // For now, only articulate the FRONT LEFT wheel.
  int delta = 0;
  int motorIDX;
 
  bool stillRotating = false;

  for(motorIDX = 0; motorIDX <= 5; ++motorIDX)
