This commit is contained in:
Mark Watkins 2014-08-20 01:44:21 +10:00
parent 46b2364e2b
commit 2d4eb1de72

View File

@ -319,7 +319,6 @@ void CMS50F37Loader::processBytes(QByteArray bytes)
int year, month, day; int year, month, day;
quint8 msb;
quint8 pulse; quint8 pulse;
do { do {
@ -327,7 +326,7 @@ void CMS50F37Loader::processBytes(QByteArray bytes)
len = lengths[res & 0x1f]; len = lengths[res & 0x1f];
if (len > size) if (len >= size)
break; break;
if (len == 0) { if (len == 0) {
@ -440,8 +439,9 @@ void CMS50F37Loader::processBytes(QByteArray bytes)
cb_reset = 1; cb_reset = 1;
resetTimer.singleShot(2000,this,SLOT(resetImportTimeout()));
} }
killTimers();
resetTimer.singleShot(2000,this,SLOT(resetImportTimeout()));
break; break;
default: default:
@ -598,6 +598,7 @@ void CMS50F37Loader::requestData()
void CMS50F37Loader::killTimers() void CMS50F37Loader::killTimers()
{ {
if (resetTimer.isActive()) resetTimer.stop(); if (resetTimer.isActive()) resetTimer.stop();
if (startTimer.isActive()) startTimer.stop();
} }
void CMS50F37Loader::startImportTimeout() void CMS50F37Loader::startImportTimeout()