From fdd1b658a2992fe83b21a1c02ea4c1c63b2470d1 Mon Sep 17 00:00:00 2001 From: sawinglogz <3787776-sawinglogz@users.noreply.gitlab.com> Date: Sun, 29 Dec 2019 22:09:46 -0600 Subject: [PATCH] Update PRS1 loader to respect new preference for warnings on untested machines. --- oscar/SleepLib/loader_plugins/prs1_loader.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/oscar/SleepLib/loader_plugins/prs1_loader.cpp b/oscar/SleepLib/loader_plugins/prs1_loader.cpp index 1bfb11a0..363f62d4 100644 --- a/oscar/SleepLib/loader_plugins/prs1_loader.cpp +++ b/oscar/SleepLib/loader_plugins/prs1_loader.cpp @@ -799,17 +799,19 @@ Machine* PRS1Loader::CreateMachineFromProperties(QString propertyfile) // This time supply the machine object so it can populate machine properties.. PeekProperties(m->info, propertyfile, m); - if (!m->untested() && !s_PRS1ModelInfo.IsTested(props)) { - m->setUntested(true); + if (!s_PRS1ModelInfo.IsTested(props)) { qDebug() << info.modelnumber << "untested"; + if (p_profile->session->warnOnUntestedMachine() && !m->untested()) { + m->setUntested(true); // don't warn the user more than once #ifndef UNITTEST_MODE - QMessageBox::information(QApplication::activeWindow(), + QMessageBox::information(QApplication::activeWindow(), QObject::tr("Machine Untested"), QObject::tr("Your Philips Respironics CPAP machine (Model %1) has not been tested yet.").arg(info.modelnumber) +"\n\n"+ QObject::tr("It seems similar enough to other machines that it might work, but the developers would like a .zip copy of this machine's SD card and matching Encore .pdf reports to make sure it works with OSCAR.") ,QMessageBox::Ok); #endif + } } // Mark the machine in the profile as unsupported.