public override void ParseMessage(SPPMessage msg) { if (msg.Id != HandledType) { return; } Mode = (NoiseControlMode)msg.Payload[0]; }
private void SetNoiseControlState(NoiseControlMode mode) { switch (mode) { case NoiseControlMode.Off: _ancSwitch.IsChecked = false; _ambientSwitch.IsChecked = false; break; case NoiseControlMode.AmbientSound: _ancSwitch.IsChecked = false; _ambientSwitch.IsChecked = true; break; case NoiseControlMode.NoiseReduction: _ancSwitch.IsChecked = true; _ambientSwitch.IsChecked = false; break; } }
public static async Task SetMode(NoiseControlMode mode) { await BluetoothImpl.Instance.SendRequestAsync(SPPMessage.MessageIds.NOISE_CONTROLS, (byte)mode); }