From 5efb973cac1d737d128295b0c0eb6fba28a8b5f8 Mon Sep 17 00:00:00 2001
From: Mark Watkins <jedimark@users.sourceforge.net>
Date: Sun, 4 May 2014 01:36:21 +1000
Subject: [PATCH] Fix Variable Pressure Support display in Daily view summary
 panel

---
 sleepyhead/daily.cpp              | 14 +++++++-------
 sleepyhead/docs/update_notes.html |  4 +++-
 sleepyhead/version.h              |  2 +-
 3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/sleepyhead/daily.cpp b/sleepyhead/daily.cpp
index 382245ac..95064c89 100644
--- a/sleepyhead/daily.cpp
+++ b/sleepyhead/daily.cpp
@@ -985,15 +985,15 @@ QString Daily::getCPAPInformation(Day * cpap)
                     .arg(cpap->settings_max(CPAP_IPAP),0,'f',1);
         }
 
-        if (cpap->settingExists(CPAP_PS)) {
+        if (cpap->settingExists(CPAP_PSMin)) {
+                    EventDataType psl=cpap->settings_min(CPAP_PSMin);
+                    EventDataType psh=cpap->settings_max(CPAP_PSMax);
+                    html+=QString(STR_TR_PS+": %1-%2"+STR_UNIT_CMH2O+"<br/>")
+                        .arg(psl,0,'f',1)
+                        .arg(psh,0,'f',1);
+        } else if (cpap->settingExists(CPAP_PS)) {
             html+=QString(STR_TR_PS+": %1"+STR_UNIT_CMH2O+"<br/>")
                 .arg(cpap->settings_max(CPAP_PS),0,'f',1);
-        } else if (cpap->settingExists(CPAP_PSMin)) {
-            EventDataType psl=cpap->settings_min(CPAP_PSMin);
-            EventDataType psh=cpap->settings_max(CPAP_PSMax);
-            html+=QString(STR_TR_PS+": %1-%2"+STR_UNIT_CMH2O+"<br/>")
-                .arg(psl,0,'f',1)
-                .arg(psh,0,'f',1);
         }
     }
     html+="</td></tr>\n";
diff --git a/sleepyhead/docs/update_notes.html b/sleepyhead/docs/update_notes.html
index 4da25681..fc79db47 100644
--- a/sleepyhead/docs/update_notes.html
+++ b/sleepyhead/docs/update_notes.html
@@ -2,7 +2,7 @@
 <body>
 <div align=center>
 <h2><image src='qrc:/docs/sheep.png' width=64 height=64>SleepyHead <b>BETA</b></h2>
-<h3><b>Update Notes for v0.9.4-4</b></h3>
+<h3><b>Update Notes for v0.9.4-5</b></h3>
 
 </div>
 <b>Changes in this version</b><br/>
@@ -14,6 +14,8 @@
 <li>F12 to Screenshot restored on Apple Mac platform</li>
 <li>Added CSV importer for Somnopose iOS Sleep Position application data</li>
 <li>Added user information to Statistics page</li>
+<li>Datacard autodetection ability</li>
+<li>Philips Respironics 60 series fixes</li>
 </list>
 
 <p>Sleep Well!</p>
diff --git a/sleepyhead/version.h b/sleepyhead/version.h
index 7887b332..ffd4fa49 100644
--- a/sleepyhead/version.h
+++ b/sleepyhead/version.h
@@ -17,7 +17,7 @@
 const int major_version = 0;
 const int minor_version = 9;
 const int revision_number = 4;
-const int release_number = 4;
+const int release_number = 5;
 
 
 #ifdef UNSTABLE_BUILD