示例#1
0
        private void _memsControl_SelectedAccelerometerSensChanged(object sender, AccelerometerSensitivity accelSens)
        {
            if (_device.ReadParam <DeviceState>(Parameter.State) == DeviceState.Disconnected)
            {
                return;
            }

            _device.SetParam(Parameter.AccelerometerSens, accelSens);
            var updatedParam = _device.ReadParam <AccelerometerSensitivity>(Parameter.AccelerometerSens);

            if (updatedParam != accelSens)
            {
                _memsControl.AccelerometerSensitivityComboValue = updatedParam;
            }
        }
示例#2
0
 private static extern int device_set_AccelerometerSens(IntPtr devicePtr, AccelerometerSensitivity accelSens);
示例#3
0
 private static extern int device_read_AccelerometerSens(IntPtr devicePtr, out AccelerometerSensitivity outAccelSens);
示例#4
0
 public void ListenAnalog(AccelerometerSensitivity sensitivity, Action <AnalogState> handler, string helpText)
 {
     this.ListenAnalog((int)sensitivity / 100, handler, helpText);
 }
示例#5
0
 public void Listen(AccelerometerDirection direction, AccelerometerSensitivity sensitivity, Action handler, string helpText)
 {
     this.Listen(direction, (int)sensitivity / 100, handler, helpText);
 }