From 10ac30f7761e7fce50e9d767d4e5890f2a7a1cf4 Mon Sep 17 00:00:00 2001 From: Seeker4 Date: Tue, 3 Sep 2019 21:44:02 -0700 Subject: [PATCH 1/5] Fix problem with S9 SD card warning incorrectly appearing on Welcome --- oscar/welcome.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oscar/welcome.cpp b/oscar/welcome.cpp index ad1da694..4edcd1be 100644 --- a/oscar/welcome.cpp +++ b/oscar/welcome.cpp @@ -44,11 +44,11 @@ void Welcome::refreshPage() bool noMachines = mlist.isEmpty() && posmachines.isEmpty() && oximachines.isEmpty() && stgmachines.isEmpty(); - bool showCardWarning = !noMachines; + bool showCardWarning = noMachines; // The SDCard warning does not need to be seen anymore for people who DON'T use ResMed S9's.. show first import and only when S9 is present for (auto & mach :mlist) { - if (mach->series().compare("S9") == 0) showCardWarning = true; + if (mach->brand().contains("ResMed") && mach->series().contains("S9")) showCardWarning = true; } ui->S9Warning->setVisible(showCardWarning); From a1389ba68a5f917841f49ebc562c973c55c7be1a Mon Sep 17 00:00:00 2001 From: Seeker4 Date: Fri, 6 Sep 2019 22:14:32 -0700 Subject: [PATCH 2/5] Include date and time at bottom of report pages --- oscar/reports.cpp | 5 ++++- oscar/statistics.cpp | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/oscar/reports.cpp b/oscar/reports.cpp index 9f69c466..98d12eac 100644 --- a/oscar/reports.cpp +++ b/oscar/reports.cpp @@ -556,7 +556,10 @@ void Report::PrintReport(gGraphView *gv, QString name, QDate date) } if (first) { - QString footer = QObject::tr("OSCAR v%1").arg(VersionString); + QDateTime timestamp = QDateTime::currentDateTime(); + QString footer = QObject::tr("%1 OSCAR v%2").arg(timestamp.toString(MedDateFormat+" hh:mm")) + .arg(ReleaseStatus == "r" ? ShortVersionString : VersionString+" (" + gitRevision() + ")"); + QRectF bounds = painter.boundingRect(QRectF(0, virt_height, virt_width, normal_height), footer, QTextOption(Qt::AlignHCenter)); diff --git a/oscar/statistics.cpp b/oscar/statistics.cpp index 08d1b14f..2bcf02cd 100644 --- a/oscar/statistics.cpp +++ b/oscar/statistics.cpp @@ -706,8 +706,11 @@ QString Statistics::generateFooter(bool showinfo) if (showinfo) { html += "
"; - html += tr("This report was generated by OSCAR v%1").arg(ShortVersionString) + "
" - +tr("OSCAR is free open-source CPAP report software"); + QDateTime timestamp = QDateTime::currentDateTime(); + html += tr("This report was generated on %1 by OSCAR v%2").arg(timestamp.toString(MedDateFormat + " hh:mm")) + .arg(ReleaseStatus == "r" ? ShortVersionString : VersionString + " (" + gitRevision() + ")") + + "
" + + tr("OSCAR is free open-source CPAP report software"); html += "
"; } From 67d589f7a48e73ec33f0e893f76bb220cbf83a50 Mon Sep 17 00:00:00 2001 From: Seeker4 Date: Fri, 6 Sep 2019 22:15:36 -0700 Subject: [PATCH 3/5] Change recognition of S9 for SD card warning because of changes to machine naming --- oscar/welcome.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oscar/welcome.cpp b/oscar/welcome.cpp index 4edcd1be..29e4a2bc 100644 --- a/oscar/welcome.cpp +++ b/oscar/welcome.cpp @@ -48,7 +48,7 @@ void Welcome::refreshPage() // The SDCard warning does not need to be seen anymore for people who DON'T use ResMed S9's.. show first import and only when S9 is present for (auto & mach :mlist) { - if (mach->brand().contains("ResMed") && mach->series().contains("S9")) showCardWarning = true; + if (mach->brand().contains(STR_MACH_ResMed) && mach->series().contains("S9")) showCardWarning = true; } ui->S9Warning->setVisible(showCardWarning); From 45814d129c90228fb533533b29b3ccd4dcd7fab2 Mon Sep 17 00:00:00 2001 From: Seeker4 Date: Fri, 6 Sep 2019 22:16:35 -0700 Subject: [PATCH 4/5] Update release notes, add documentation about graph ordering --- oscar/daily.cpp | 7 +++++++ oscar/docs/release_notes.html | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/oscar/daily.cpp b/oscar/daily.cpp index b4b029b5..f320fff3 100644 --- a/oscar/daily.cpp +++ b/oscar/daily.cpp @@ -64,6 +64,13 @@ inline QString channelInfo(ChannelID code) { // + (schema::channel[code].units() != "0" ? "\n("+schema::channel[code].units()+")" : ""); } +// Charts displayed on the Daily page are defined in the Daily::Daily constructor. They consist of some hard-coded charts and a table +// of channel codes for which charts are generated. If the list of channel codes is changed, the graph order lists below will need to +// be changed correspondingly. +// +// Note that "graph codes" are strings used to identify graphs and are not the same as "channel codes." The mapping between channel codes +// and graph codes is found in schema.cpp. (What we here call 'graph cdoes' are called 'lookup codes' in schema.cpp.) +// // // List here the graph codes in the order they are to be displayed. // Do NOT list a code twice, or Oscar will crash when the profile is closed! diff --git a/oscar/docs/release_notes.html b/oscar/docs/release_notes.html index f4f87ed9..f78c2466 100644 --- a/oscar/docs/release_notes.html +++ b/oscar/docs/release_notes.html @@ -10,8 +10,10 @@ Which was written and copyright 2011-2018 © Mark Watkins Changes and fixes in OSCAR **AFTER** v1.1.0-testing-4
  • Portions of OSCAR are © 2019 by The OSCAR Team
  • -
  • [new] Default graphs and View/reset graphs use a different order for advanced CPAP modes
  • +
  • [new] Default and View/reset graphs use a different order for AVS and AVAPS CPAP modes
  • [new] Add preference setting to include serial number on machine settings list
  • +
  • [fix] Place date, time, and Oscar version information in report footers
  • +
  • [fix] Update identification of ResMed S9 machines on Welcome page
  • [fix] Correct formatting of event number in Daily Events tab
  • [fix] Correct timezone offset for somnopose imports
  • [fix] Show a progress bar when setting Overview range to a large number of days
  • From 45018f490312f945c3921cdbfca87e53cf7db35c Mon Sep 17 00:00:00 2001 From: sawinglogz <3787776-sawinglogz@users.noreply.gitlab.com> Date: Sat, 7 Sep 2019 15:02:16 -0400 Subject: [PATCH 5/5] Update PRS1 loader from 500G110 test data. --- oscar/SleepLib/loader_plugins/prs1_loader.cpp | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/oscar/SleepLib/loader_plugins/prs1_loader.cpp b/oscar/SleepLib/loader_plugins/prs1_loader.cpp index 01b4385a..df614e96 100644 --- a/oscar/SleepLib/loader_plugins/prs1_loader.cpp +++ b/oscar/SleepLib/loader_plugins/prs1_loader.cpp @@ -234,6 +234,7 @@ static const PRS1TestedModel s_PRS1TestedModels[] = { { "400X150", 0, 6, "DreamStation CPAP Pro" }, { "500X110", 0, 6, "DreamStation Auto CPAP" }, { "500X150", 0, 6, "DreamStation Auto CPAP" }, + { "500G110", 0, 6, "DreamStation Go Auto" }, { "502G150", 0, 6, "DreamStation Go Auto" }, { "600X110", 0, 6, "DreamStation BiPAP Pro" }, { "700X110", 0, 6, "DreamStation Auto BiPAP" }, @@ -4653,8 +4654,8 @@ bool PRS1DataChunk::ParseSettingsF0V6(const unsigned char* data, int size) if (data[pos] != 0 && data[pos] != 3) { CHECK_VALUES(data[pos], 1, 2); // 1 when EZ-Start is enabled? 2 when Auto-Trial? 3 when Auto-Trial is off or Opti-Start isn't off? } - if (len == 2) { // 400G has extra byte - CHECK_VALUE(data[pos+1], 0); + if (len == 2) { // 400G, 500G has extra byte + CHECK_VALUES(data[pos+1], 0, 0x20); // Maybe related to Opti-Start? } break; case 0x0a: // CPAP pressure setting @@ -4736,8 +4737,8 @@ bool PRS1DataChunk::ParseSettingsF0V6(const unsigned char* data, int size) case 0x35: // Humidifier setting this->ParseHumidifierSettingV3(data[pos], data[pos+1], true); break; - case 0x36: - CHECK_VALUE(data[pos], 0); + case 0x36: // Mask Resistance Lock + CHECK_VALUES(data[pos], 0, 0x80); break; case 0x38: // Mask Resistance if (data[pos] != 0) { // 0 == mask resistance off @@ -4889,7 +4890,7 @@ bool PRS1DataChunk::ParseSummaryF0V6(void) CHECK_VALUE(data[pos+0x1c], 0x00); //CHECK_VALUES(data[pos+0x1d], 0x0c, 0x0d); //CHECK_VALUES(data[pos+0x1e], 0x31, 0x3b); - // TODO: 400G has 8 more bytes? + // TODO: 400G and 500G has 8 more bytes? // TODO: 400G sometimes has another 4 on top of that? } break; @@ -4914,13 +4915,13 @@ bool PRS1DataChunk::ParseSummaryF0V6(void) this->ParseHumidifierSettingV3(data[pos+2], data[pos+3]); break; case 0x0e: - // only seen once on 400G? - CHECK_VALUE(data[pos], 0); + // only seen once on 400G, many times on 500G + CHECK_VALUES(data[pos], 0, 6); CHECK_VALUE(data[pos+1], 0); - CHECK_VALUE(data[pos+2], 7); - CHECK_VALUE(data[pos+3], 7); - CHECK_VALUE(data[pos+4], 7); - CHECK_VALUE(data[pos+5], 0); + //CHECK_VALUES(data[pos+2], 7, 9); + //CHECK_VALUES(data[pos+3], 7, 15); + //CHECK_VALUES(data[pos+4], 7, 12); + //CHECK_VALUES(data[pos+5], 0, 3); break; case 0x05: // AutoCPAP-related? First appeared on 500X, follows 4, before 8, look like pressure values