|
|
@@ -116,7 +116,7 @@ static void scsiInitiatorUpdateLed()
|
|
|
// Update status indicator, the led blinks every 5 seconds and is on the longer the more data has been transferred
|
|
|
const int period = 256;
|
|
|
int phase = (millis() % period);
|
|
|
- int duty = g_initiator_state.sectors_done * period / g_initiator_state.sectorcount;
|
|
|
+ int duty = (int64_t)g_initiator_state.sectors_done * period / g_initiator_state.sectorcount;
|
|
|
|
|
|
// Minimum and maximum time to verify that the blink is visible
|
|
|
if (duty < 50) duty = 50;
|
|
|
@@ -372,9 +372,10 @@ void scsiInitiatorMainLoop()
|
|
|
g_initiator_state.target_file.flush();
|
|
|
|
|
|
int speed_kbps = numtoread * g_initiator_state.sectorsize / (millis() - time_start);
|
|
|
- log_f("SCSI read succeeded, sectors done: %d / %d speed %d kB/s - %.2f%%",
|
|
|
- g_initiator_state.sectors_done, g_initiator_state.sectorcount, speed_kbps,
|
|
|
- (float)(((float)g_initiator_state.sectors_done / (float)g_initiator_state.sectorcount) * 100.0));
|
|
|
+ log("SCSI read succeeded, sectors done: ",
|
|
|
+ (int)g_initiator_state.sectors_done, " / ", (int)g_initiator_state.sectorcount,
|
|
|
+ " speed ", speed_kbps, " kB/s - ",
|
|
|
+ (int)(100 * (int64_t)g_initiator_state.sectors_done / g_initiator_state.sectorcount), "%");
|
|
|
}
|
|
|
}
|
|
|
}
|