From f03ab85da517bc26e7cf53a4e4f622f5cd3264db Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Wed, 2 Jul 2014 15:22:28 +1000 Subject: [PATCH] Fix FPIcon summary-only AHI overview display --- sleepyhead/SleepLib/loader_plugins/icon_loader.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp b/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp index e7290f07..b02a4399 100644 --- a/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp @@ -711,8 +711,16 @@ bool FPIconLoader::OpenSummary(Machine *mach, QString filename, Profile *profile sess->really_set_first(qint64(ts) * 1000L); sess->really_set_last(qint64(ts + usage) * 1000L); sess->SetChanged(true); + sess->setCount(CPAP_Obstructive, j2); + sess->setCph(CPAP_Obstructive, j2 / (float(usage)/3600.00)); + sess->setCount(CPAP_Hypopnea, j3); + sess->setCph(CPAP_Hypopnea, j3 / (float(usage)/3600.00)); + + sess->setCount(CPAP_FlowLimit, j4); + sess->setCph(CPAP_FlowLimit, j4 / (float(usage)/3600.00)); + SessDate.insert(date, sess); // sess->setCount(CPAP_Obstructive,j1);