public async Task <bool> StopDeviceCmd() { if (!_device.AllowedMessages.ContainsKey(MessageAttributeType.StopDeviceCmd)) { return(false); } if (_runner != null) { _runner.Cancel(); } //_ = SetBusy(); Probably a good idea to bypass the delay just for this command. await _device.SendStopDeviceCmd(); return(true); }
public async void Stop(ButtplugClientDevice device) { if (_client == null) { return; } if (!device.AllowedMessages.ContainsKey(ServerMessage.Types.MessageAttributeType.StopDeviceCmd)) { return; } try { await device.SendStopDeviceCmd(); } catch (Exception e) { RecordButtplugException("ButtplugAdapter.Stop", e); } }