CMS50F37 debug test 8

This commit is contained in:
Mark Watkins 2014-08-19 00:35:30 +10:00
parent 6283cb52ce
commit 0b2f91184d
2 changed files with 10 additions and 6 deletions

View File

@ -258,11 +258,8 @@ void CMS50F37Loader::processBytes(QByteArray bytes)
} }
if (!started_import) { if (!started_import) {
if (++sequence < cms50_seqlength) { startTimer.singleShot(300, this, SLOT(nextCommand()));
qDebug() << "Read:" << str.join(","); qDebug() << "Read:" << str.join(",");
// Send the next command packet in sequence
nextCommand();
}
} else { } else {
qDebug() << "Import:" << str.join(","); qDebug() << "Import:" << str.join(",");
} }
@ -325,8 +322,12 @@ void CMS50F37Loader::sendCommand(unsigned char c)
void CMS50F37Loader::nextCommand() void CMS50F37Loader::nextCommand()
{ {
if (sequence < cms50_seqlength) if (++sequence < cms50_seqlength) {
// Send the next command packet in sequence
sendCommand(cms50_sequence[sequence]); sendCommand(cms50_sequence[sequence]);
} else {
qDebug() << "Run out of startup tasks to do and import failed!";
}
} }

View File

@ -54,6 +54,7 @@ protected slots:
virtual void startImportTimeout(); virtual void startImportTimeout();
virtual void shutdownPorts(); virtual void shutdownPorts();
void nextCommand(); void nextCommand();
@ -68,6 +69,7 @@ protected:
void sendCommand(unsigned char c); void sendCommand(unsigned char c);
// Switch device to live streaming mode // Switch device to live streaming mode
virtual void resetDevice(); virtual void resetDevice();
@ -76,6 +78,7 @@ protected:
private: private:
int sequence; int sequence;
EventList *PULSE; EventList *PULSE;