public async Task StopReading() { if (readingAxes != GyroscopeAxes.None) { readingAxes = GyroscopeAxes.None; await WriteCharacteristicByte(GyroscopeCharacteristicConfigUuid, 0); } }
/// <summary> /// Enable getting GyroscopeMeasurementValueChanged events on the given axes. /// The gyro produces new values about once per second and that period cannot be changed. /// </summary> /// <param name="enableAxes"></param> public async Task StartReading(GyroscopeAxes enableAxes) { if (readingAxes != enableAxes) { byte value = (byte)enableAxes; await WriteCharacteristicByte(GyroscopeCharacteristicConfigUuid, value); readingAxes = enableAxes; } }