mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Fix date and time handling for new CMS50Dplus model
This commit is contained in:
parent
589eec69ec
commit
73a225556a
@ -578,9 +578,11 @@ void CMS50F37Loader::processBytes(QByteArray bytes)
|
||||
|
||||
if (!started_import) {
|
||||
// startTimer.singleShot(2000, this, SLOT(requestData()));
|
||||
importCount = 0;
|
||||
qDebug() << "cms50f37 - pB: Read:" << len << size << str.join(",");
|
||||
} else {
|
||||
qDebug() << "cms50f37 - pB: Import:" << len << size << str.join(",");
|
||||
importCount++;
|
||||
// qDebug() << "cms50f37 - pB: Import:" << len << size << str.join(",");
|
||||
}
|
||||
|
||||
idx += len;
|
||||
@ -827,9 +829,11 @@ void CMS50F37Loader::resetImportTimeout()
|
||||
if (resetTimer.isActive())
|
||||
resetTimer.stop();
|
||||
|
||||
if (!finished_import) resetTimer.singleShot(2000, this, SLOT(resetImportTimeout()));
|
||||
if (!finished_import)
|
||||
resetTimer.singleShot(2000, this, SLOT(resetImportTimeout()));
|
||||
} else {
|
||||
qDebug() << "cms50f37 - Oximeter device stopped transmitting.. Transfer complete";
|
||||
qDebug() << "cms50f37 - Import packet count: " << importCount;
|
||||
// We were importing, but now are done
|
||||
if (!finished_import && (started_import && started_reading)) {
|
||||
qDebug() << "cms50f37 - Switching CMS50F37 back to live mode and finalizing import";
|
||||
|
@ -82,14 +82,10 @@ protected slots:
|
||||
virtual void resetImportTimeout();
|
||||
virtual void startImportTimeout();
|
||||
virtual void shutdownPorts();
|
||||
|
||||
|
||||
|
||||
void nextCommand();
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
bool readSpoRFile(const QString & path);
|
||||
virtual void processBytes(QByteArray bytes);
|
||||
|
||||
@ -100,12 +96,9 @@ protected:
|
||||
void sendCommand(quint8 c);
|
||||
void sendCommand(quint8 c, quint8 c2);
|
||||
|
||||
|
||||
// Switch device to live streaming mode
|
||||
virtual void resetDevice();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
int sequence;
|
||||
@ -125,6 +118,7 @@ protected:
|
||||
int cb_reset,imp_callbacks;
|
||||
|
||||
int received_bytes;
|
||||
int importCount;
|
||||
|
||||
int m_itemCnt;
|
||||
int m_itemTotal;
|
||||
|
@ -647,11 +647,11 @@ void OximeterImport::on_radioSyncOximeter_clicked()
|
||||
ui->syncCPAPGroup->setVisible(false);
|
||||
if ( oximodule ) {
|
||||
if (oximodule->isStartTimeValid()) {
|
||||
qDebug() << "oximod - Oximeter time is valid " << oximodule->startTime().toString("yyyy-MMM-dd HH:mm:ssap");
|
||||
qDebug() << "oximod - Oximeter time is " << oximodule->startTime().toString("yyyy-MMM-dd HH:mm:ssap");
|
||||
ui->calendarWidget->setSelectedDate(oximodule->startTime().date());
|
||||
ui->dateTimeEdit->setDateTime(oximodule->startTime());
|
||||
} else {
|
||||
qDebug() << "oximod - Oximeter time is not valid" << oximodule->startTime().toString("yyyy-MMM-dd HH:mm:ssap");
|
||||
qDebug() << "oximod - Oximeter time is faked" << oximodule->startTime().toString("yyyy-MMM-dd HH:mm:ssap");
|
||||
ui->calendarWidget->setSelectedDate(oximodule->startTime().date());
|
||||
ui->dateTimeEdit->setDateTime(oximodule->startTime());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user