Пример #1
0
        public WearableDeviceConfig()
        {
            accelerometer = new WearableSensorConfig();
            gyroscope     = new WearableSensorConfig();
            rotation      = new WearableSensorConfig();

            doubleTap = new WearableGestureConfig();
            headNod   = new WearableGestureConfig();
            headShake = new WearableGestureConfig();

            updateInterval = WearableConstants.DefaultUpdateInterval;
            rotationSource = WearableConstants.DefaultRotationSource;
        }
Пример #2
0
        public WearableDeviceConfig()
        {
            accelerometer   = new WearableSensorConfig();
            gyroscope       = new WearableSensorConfig();
            rotationNineDof = new WearableSensorConfig();
            rotationSixDof  = new WearableSensorConfig();

            doubleTapGesture    = new WearableGestureConfig();
            headNodGesture      = new WearableGestureConfig();
            headShakeGesture    = new WearableGestureConfig();
            touchAndHoldGesture = new WearableGestureConfig();

            inputGesture       = new WearableGestureConfig();
            affirmativeGesture = new WearableGestureConfig();
            negativeGesture    = new WearableGestureConfig();

            updateInterval = WearableConstants.DefaultUpdateInterval;
        }
Пример #3
0
        /// <summary>
        /// Sets <see cref="WearableSensorConfig"/> <paramref name="config"/> for the appropriate sensor
        /// based on the passed <see cref="SensorId"/> <paramref name="sensorId"/>.
        /// </summary>
        /// <param name="sensorId"></param>
        /// <param name="config"></param>
        public void SetSensorConfig(SensorId sensorId, WearableSensorConfig config)
        {
            switch (sensorId)
            {
            case SensorId.Accelerometer:
                accelerometer = config;
                break;

            case SensorId.Gyroscope:
                gyroscope = config;
                break;

            case SensorId.RotationNineDof:
                rotationNineDof = config;
                break;

            case SensorId.RotationSixDof:
                rotationSixDof = config;
                break;

            default:
                throw new ArgumentOutOfRangeException("sensorId", sensorId, null);
            }
        }