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; } }
private static extern int device_set_AccelerometerSens(IntPtr devicePtr, AccelerometerSensitivity accelSens);
private static extern int device_read_AccelerometerSens(IntPtr devicePtr, out AccelerometerSensitivity outAccelSens);
public void ListenAnalog(AccelerometerSensitivity sensitivity, Action <AnalogState> handler, string helpText) { this.ListenAnalog((int)sensitivity / 100, handler, helpText); }
public void Listen(AccelerometerDirection direction, AccelerometerSensitivity sensitivity, Action handler, string helpText) { this.Listen(direction, (int)sensitivity / 100, handler, helpText); }