Beispiel #1
0
        /// <summary>
        /// Raise the event while the hid report is received
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e">The HID HidReport</param>
        private void _controller_OnReportUpdated(object sender, DeviceStateReport e)
        {
            foreach (var state in e.AxisStateCollection)
            {
                var _axis = GetAxisByName(state.AxisIndex.ToString()) as IrixiAxis;
                _axis.AbsPosition = state.AbsPosition;
                _axis.IsHomed     = state.IsHomed;
            }

            OnHIDReportReceived?.Invoke(this, e);
        }
Beispiel #2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            int err = (int)value;

            return(DeviceStateReport.ErrorCodeToString(err));
        }