mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Attempt that fix again.
This commit is contained in:
@@ -233,12 +233,12 @@ public:
|
||||
Bytes read(int side, bool synced, nanoseconds_t readTime,
|
||||
nanoseconds_t hardSectorThreshold)
|
||||
{
|
||||
hardSectorThreshold += 5e5; /* Round to nearest ms. */
|
||||
uint8_t threshold_ms = (hardSectorThreshold + 5e5) / 1e6; /* round to nearest ms */
|
||||
struct read_frame f = {
|
||||
.f = { .type = F_FRAME_READ_CMD, .size = sizeof(f) },
|
||||
.side = (uint8_t) side,
|
||||
.synced = (uint8_t) synced,
|
||||
.hardsec_threshold_ms = (uint8_t) (hardSectorThreshold / 1e6),
|
||||
.hardsec_threshold_ms = threshold_ms,
|
||||
};
|
||||
uint16_t milliseconds = readTime / 1e6;
|
||||
((uint8_t*)&f.milliseconds)[0] = milliseconds;
|
||||
|
||||
Reference in New Issue
Block a user