Ejemplo n.º 1
0
        private static HidNumericControlDescription GetGazeUsageFromCollectionId(GazeDevicePreview gazeDevice, UInt16 childUsageId, UInt16 parentUsageId)
        {
            var numericControls = gazeDevice.GetNumericControlDescriptions(
                GazeExtendedUsages.UsagePage_EyeHeadTracker, childUsageId);

            for (int i = 0; i < numericControls.Count; i++)
            {
                var parentCollections = numericControls[i].ParentCollections;
                if (parentCollections.Count > 0 &&
                    parentCollections[0].UsagePage == GazeExtendedUsages.UsagePage_EyeHeadTracker &&
                    parentCollections[0].UsageId == parentUsageId)
                {
                    return(numericControls[i]);
                }
            }
            return(null);
        }
Ejemplo n.º 2
0
        public static HidNumericControlDescription GetGazeUsageFromCollectionId(
            GazeDevicePreview gazeDevice,
            ushort childUsageId,
            ushort parentUsageId)
        {
            var numericControls = gazeDevice.GetNumericControlDescriptions(
                (ushort)GazeHidUsages.UsagePage_EyeHeadTracker, childUsageId);

            for (int i = 0; i < numericControls.Count; i++)
            {
                var parentCollections = numericControls[i].ParentCollections;
                if (parentCollections.Count > 0 &&
                    parentCollections[0].UsagePage == (ushort)GazeHidUsages.UsagePage_EyeHeadTracker &&
                    parentCollections[0].UsageId == parentUsageId)
                {
                    return(numericControls[i]);
                }
            }

            return(null);
        }