diff --git a/oscar/SleepLib/loader_plugins/prs1_loader.cpp b/oscar/SleepLib/loader_plugins/prs1_loader.cpp index 522d70cd..57845487 100644 --- a/oscar/SleepLib/loader_plugins/prs1_loader.cpp +++ b/oscar/SleepLib/loader_plugins/prs1_loader.cpp @@ -3039,8 +3039,12 @@ bool PRS1Import::ImportEventChunk(PRS1DataChunk* event) if (session->last() == 0) { qWarning() << sessionid << "End time not set by summary?"; } else if (t > session->last()) { - // This has only been seen once, with corrupted data, in which the summary and event - // files each contained multiple conflicting sessions (all brief) with the same ID. + // This has only been seen in two instances: + // 1. Once with corrupted data, in which the summary and event files each contained + // multiple conflicting sessions (all brief) with the same ID. + // 2. On one 500G110, multiple PRS1PressureSetEvents appear after the end of the session, + // across roughtly two dozen sessions. These seem to be discarded on official reports, + // see ImportEvent() below. qWarning() << sessionid << "Events continue after summary?"; } // Events can end before the session if the mask was off before the equipment turned off. @@ -3071,6 +3075,10 @@ void PRS1Import::ImportEvent(qint64 t, PRS1ParsedEvent* e) switch (e->m_type) { case PRS1PressureSetEvent::TYPE: // currentPressure is used to calculate unintentional leak, not just PS + // TODO: These have sometimes been observed with t > session->last() on a 500G110. + // Official reports seem to discard such events, OSCAR currently doesn't. + // Test this more thoroughly before changing behavior here. + // fall through case PRS1IPAPSetEvent::TYPE: case PRS1IPAPAverageEvent::TYPE: AddEvent(channel, t, e->m_value, e->m_gain); @@ -7258,10 +7266,15 @@ bool PRS1DataChunk::ParseSummaryF0V6(void) tt += data[pos] | (data[pos+1] << 8); // This adds to the total duration (otherwise it won't match report) this->ParseHumidifierSettingV3(data[pos+2], data[pos+3]); break; + case 0x0d: // ??? + // seen on one 500G multiple times + //CHECK_VALUE(data[pos], 0); // 16-bit value + //CHECK_VALUE(data[pos+1], 0); + break; case 0x0e: // only seen once on 400G, many times on 500G - CHECK_VALUES(data[pos], 0, 6); - CHECK_VALUE(data[pos+1], 0); + //CHECK_VALUES(data[pos], 0, 6); // 16-bit value + //CHECK_VALUE(data[pos+1], 0); //CHECK_VALUES(data[pos+2], 7, 9); //CHECK_VALUES(data[pos+3], 7, 15); //CHECK_VALUES(data[pos+4], 7, 12); diff --git a/oscar/SleepLib/schema.cpp b/oscar/SleepLib/schema.cpp index 506262b1..6faf5859 100644 --- a/oscar/SleepLib/schema.cpp +++ b/oscar/SleepLib/schema.cpp @@ -108,7 +108,7 @@ void init() // Note: Old channel names stored in channels.xml are not translatable.. they need to be moved to be defined AFTER here instead if (!schema::channel.Load(":/docs/channels.xml")) { QMessageBox::critical(0, STR_MessageBox_Error, - QObject::tr("Couldn't parse Channels.xml, this build is seriously borked, no choice but to abort!!"), + QObject::tr("Couldn't parse Channels.xml, OSCAR cannot continue and is exiting."), QMessageBox::Ok); QApplication::exit(-1); } diff --git a/oscar/VERSION b/oscar/VERSION index d47fec73..daf1d391 100644 --- a/oscar/VERSION +++ b/oscar/VERSION @@ -1,5 +1,5 @@ // Update the string below to set OSCAR's version and release status. // See https://semver.org/spec/v2.0.0.html for details on format. -#define VERSION "1.1.1-rc-4" +#define VERSION "1.1.2-alpha-0" diff --git a/oscar/mainwindow.cpp b/oscar/mainwindow.cpp index 97e676f8..0762f547 100644 --- a/oscar/mainwindow.cpp +++ b/oscar/mainwindow.cpp @@ -1827,7 +1827,7 @@ void MainWindow::RestartApplication(bool force_login, QString cmdline) if (QProcess::startDetached("/usr/bin/open", args)) { QApplication::instance()->exit(); } else { - QMessageBox::warning(nullptr, tr("Gah!"), + QMessageBox::warning(nullptr, STR_MessageBox_Error, tr("If you can read this, the restart command didn't work. You will have to do it yourself manually."), QMessageBox::Ok); } @@ -1854,7 +1854,7 @@ void MainWindow::RestartApplication(bool force_login, QString cmdline) // ::exit(0); } else { - QMessageBox::warning(nullptr, tr("Gah!"), + QMessageBox::warning(nullptr, STR_MessageBox_Error, tr("If you can read this, the restart command didn't work. You will have to do it yourself manually."), QMessageBox::Ok); } diff --git a/oscar/welcome.cpp b/oscar/welcome.cpp index 6e7a844c..bf797f81 100644 --- a/oscar/welcome.cpp +++ b/oscar/welcome.cpp @@ -178,7 +178,7 @@ QString Welcome::GenerateCPAPHTML() int daysto = date.daysTo(QDate::currentDate()); QString daystring; if (daysto == 1) daystring += tr("last night"); - else if (daysto == 2) daystring += tr("yesterday"); + else if (daysto == 2) daystring += tr("1 day ago"); else daystring += tr("%2 days ago").arg(date.daysTo(QDate::currentDate())); html += tr("was %1 (on %2)").arg(daystring).arg(date.toString(Qt::SystemLocaleLongDate)) + "
"; @@ -339,8 +339,8 @@ QString Welcome::GenerateOxiHTML() html += "

"+QObject::tr("Most recent Oximetry data: %1 ").arg(oxidate.toString(Qt::SystemLocaleLongDate)).arg(oxidate.toString(Qt::ISODate)); if (daysto == 1) html += QObject::tr("(last night)"); - else if (daysto == 2) html += QObject::tr("(yesterday)"); - else html += QObject::tr("(%2 day ago)").arg(oxidate.daysTo(QDate::currentDate())); + else if (daysto == 2) html += QObject::tr("(1 day ago)"); + else html += QObject::tr("(%2 days ago)").arg(oxidate.daysTo(QDate::currentDate())); html+="

"; ui->oxiIcon->setVisible(true); ui->oxiInfo->setVisible(true);