示例#1
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            AxisSourceType original = (AxisSourceType)value;
            bool           ret      = ((sbyte)original == -2);

            return(ret);
        }
示例#2
0
        public AxisConfig()
        {
            _calibMin    = -32767;
            _calibCenter = 0;
            _calibMax    = 32767;

            _isInverted   = false;
            _offsetAngle  = 0;
            _isOutEnabled = true;

            _sourceMain      = AxisSourceType.Buttons;
            _sourceSecondary = AxisType.X;
            _function        = AxisFunction.None;

            _decrementButton = 0;
            _incrementButton = 0;
            _centerButton    = 0;
            _step            = 0;

            _resolution = 16;
            _deadband   = 0;

            _channel    = 0;
            _i2cAddress = AxisAddressType.ADS1115_00;

            _curveShape = new ObservableCollection <Point>();
            for (int i = 0; i < 11; i++)
            {
                _curveShape.Add(new Point(i, 0));
            }
            _filterLevel = 0;

            _isCalibCenterUnlocked = false;
        }
示例#3
0
        public AxisConfig()
        {
            _calibMin    = -32767;
            _calibCenter = 0;
            _calibMax    = 32767;

            _isInverted   = false;
            _offsetAngle  = 0;
            _isOutEnabled = true;

            _sourceMain      = AxisSourceType.None;
            _sourceSecondary = AxisType.X;
            _function        = AxisFunction.None;

            _button1 = 0;
            _button2 = 0;
            _button3 = 0;
            _divider = 255;

            _button1_type = AxisButtonFullType.Down;
            _button2_type = AxisButtonCutType.Reset;
            _button3_type = AxisButtonFullType.Up;

            _prescaler = 100;

            _resolution = 16;
            _deadband   = 0;

            _channel    = 0;
            _i2cAddress = AxisAddressType.ADS1115_00;

            _curveShape = new ObservableCollection <Point>();
            for (int i = 0; i < 11; i++)
            {
                _curveShape.Add(new Point(i, -100 + 20 * i));
            }
            _filterLevel = 0;

            _isCentered = false;
        }