mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Add UpdateProgress event to ATA dumper.
This commit is contained in:
@@ -274,7 +274,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
if(currentSpeed < minSpeed && currentSpeed != 0) minSpeed = currentSpeed;
|
||||
#pragma warning restore RECS0018 // Comparison of floating point numbers with equality operator
|
||||
|
||||
DicConsole.Write("\rReading sector {0} of {1} ({2:F3} MiB/sec.)", i, blocks, currentSpeed);
|
||||
UpdateProgress?.Invoke($"\rReading sector {i} of {blocks} ({currentSpeed:F3} MiB/sec.)",
|
||||
(long)i, (long)blocks);
|
||||
|
||||
bool error = ataReader.ReadBlocks(out cmdBuf, i, blocksToRead, out duration);
|
||||
|
||||
|
||||
@@ -5,5 +5,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
public event UpdateStatusHandler UpdateStatus;
|
||||
public event ErrorMessageHandler ErrorMessage;
|
||||
public event ErrorMessageHandler StoppingErrorMessage;
|
||||
public event UpdateProgressHandler UpdateProgress;
|
||||
}
|
||||
}
|
||||
@@ -299,6 +299,7 @@ namespace DiscImageChef.Commands
|
||||
dumper.UpdateStatus += Progress.UpdateStatus;
|
||||
dumper.ErrorMessage += Progress.ErrorMessage;
|
||||
dumper.StoppingErrorMessage += Progress.ErrorMessage;
|
||||
dumper.UpdateProgress += Progress.UpdateProgress;
|
||||
|
||||
if(dev.IsUsb && dev.UsbVendorId == 0x054C &&
|
||||
(dev.UsbProductId == 0x01C8 || dev.UsbProductId == 0x01C9 || dev.UsbProductId == 0x02D2))
|
||||
|
||||
Reference in New Issue
Block a user