Skip to content

Commit

Permalink
Save
Browse files Browse the repository at this point in the history
  • Loading branch information
buldo committed May 22, 2024
1 parent 6f249c8 commit be288de
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/EfuseManager/ViewModels/DeviceViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ namespace EfuseManager.ViewModels;

public class DeviceViewModel : ObservableObject
{
private readonly IUsbDevice _device;

public DeviceViewModel(IUsbDevice device)
{
_device = device;
RealDevice = device;
if (device is UsbDevice usbdevice)
{
DeviceName = $"Address: {usbdevice.Address}; Bus: {usbdevice.BusNumber}; {usbdevice}";
Expand All @@ -22,4 +20,6 @@ public DeviceViewModel(IUsbDevice device)
}

public string DeviceName { get; }

public IUsbDevice RealDevice { get; }
}
9 changes: 8 additions & 1 deletion src/EfuseManager/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ private void ExecuteWrite()

private void ExecuteRead()
{
throw new NotImplementedException();
if (SelectedDevice == null)
{
return;
}

var device = SelectedDevice.RealDevice;
var rtlDevice = _driver.CreateRtlDevice(device);
//rtlDevice.Init();
}

private void ExecuteRefresh()
Expand Down
8 changes: 1 addition & 7 deletions src/Rtl8812auNet/Rtl8812au/Rtl8812aDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,7 @@ private void StartWithMonitorMode(SelectedChannel selectedChannel)

private bool NetDevOpen(SelectedChannel selectedChannel)
{
var status = _halModule.rtw_hal_init(selectedChannel);
if (status == false)
{
return false;
}

return true;
return _halModule.rtw_hal_init(selectedChannel);
}

private void BulkDataHandler(ReadOnlySpan<byte> data)
Expand Down

0 comments on commit be288de

Please sign in to comment.