mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 12:10:43 +00:00
Resolve CMS50E corrupted record hedaer condition
This commit is contained in:
parent
04dff07933
commit
24bc115a26
@ -347,14 +347,28 @@ int CMS50Loader::doImportMode()
|
|||||||
} else if (!started_reading) { // have not got a valid trio yet, skip...
|
} else if (!started_reading) { // have not got a valid trio yet, skip...
|
||||||
idx += 1;
|
idx += 1;
|
||||||
} else {
|
} else {
|
||||||
//Completed
|
// scan ahead for another 0xf0 in case it's corrupted..
|
||||||
finished_import = true;
|
bool resync = false;
|
||||||
killTimers();
|
|
||||||
m_importing = false;
|
for (int i=idx; i < available; ++i) {
|
||||||
m_status = NEUTRAL;
|
c=(unsigned char)buffer.at(i);
|
||||||
emit importComplete(this);
|
if ((c & 0xf0) == 0xf0) {
|
||||||
resetTimer.singleShot(2000, this, SLOT(shutdownPorts()));
|
idx = i;
|
||||||
return available;
|
resync = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!resync) {
|
||||||
|
// Data transfer has completed
|
||||||
|
finished_import = true;
|
||||||
|
killTimers();
|
||||||
|
m_importing = false;
|
||||||
|
m_status = NEUTRAL;
|
||||||
|
emit importComplete(this);
|
||||||
|
resetTimer.singleShot(2000, this, SLOT(shutdownPorts()));
|
||||||
|
return available;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user