public virtual IEnumerator <ITask> UpdateAxesHandler(UpdateAxes update)
 {
     ActionNotSupported(update.ResponsePort);
     yield break;
 }
예제 #2
0
 public virtual IEnumerator<ITask> UpdateAxesHandler(UpdateAxes update)
 {
     ActionNotSupported(update.ResponsePort);
     yield break;
 }
        private void GamePadAxisUpdated(UpdateAxes update)
        {
            LogInfo("Right x: " + (update.Body.Rx*.001).ToString(CultureInfo.InvariantCulture));
            LogInfo("Right y: " + (update.Body.Ry * .001).ToString(CultureInfo.InvariantCulture));
            LogInfo("Right z: " + (update.Body.Rz * .001).ToString(CultureInfo.InvariantCulture));
            LogInfo(" Left x: " + (update.Body.X * .001).ToString(CultureInfo.InvariantCulture));
            LogInfo(" Left y: " + (update.Body.Y*.001).ToString(CultureInfo.InvariantCulture));
            LogInfo(" Left z: " + (update.Body.Z * .001).ToString(CultureInfo.InvariantCulture));

            var req = new SetDriveRequest {LeftPower = (update.Body.Rx*.0005), RightPower = (update.Body.Y*-.0005)};

            drivePort.DriveDistance(req);
        }