Skip to content

Commit

Permalink
Update DshmDevMan.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
nefarius committed Jul 11, 2024
1 parent 9f46ee8 commit d084d6a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ControlApp/Models/DshmDevMan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ public class DshmDevMan
private DeviceNotificationListener? _listener;
//private readonly HostRadio _hostRadio;

public List<PnPDevice> Devices { get; private set; } = new();
public List<PnPDevice> Devices { get; } = new();

public bool StartListeningForDshmDevices()
public void StartListeningForDshmDevices()
{
Log.Logger.Information("Starting detection of DsHidMini devices");
if (_listener != null) return false;
if (_listener != null) return;
_listener = new DeviceNotificationListener();
_listener.DeviceArrived += OnListenerDevicesRemovedOrAdded;
_listener.DeviceRemoved += OnListenerDevicesRemovedOrAdded;
_listener.StartListen(DsHidMiniDriver.DeviceInterfaceGuid);

UpdateConnectedDshmDevicesList();
return true;
}

public void StopListeningForDshmDevices()
Expand Down

0 comments on commit d084d6a

Please sign in to comment.