From f16284b75d6e7c175aa6df449688447d84bfbc9a Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Wed, 8 Jun 2011 02:37:17 +1000 Subject: [PATCH] Fruitsalad cleanup --- Projects/CodeBlocks/SleepyHead.depend | 4 ++-- src/SleepyHeadMain.cpp | 31 +++++++++++++++++---------- src/version.h | 12 +++++------ 3 files changed, 28 insertions(+), 19 deletions(-) diff --git a/Projects/CodeBlocks/SleepyHead.depend b/Projects/CodeBlocks/SleepyHead.depend index 7fd77bfb..ba572eb0 100644 --- a/Projects/CodeBlocks/SleepyHead.depend +++ b/Projects/CodeBlocks/SleepyHead.depend @@ -8295,7 +8295,7 @@ -1307463320 /home/mark/projects/git/sleepyhead/src/version.h +1307464570 /home/mark/projects/git/sleepyhead/src/version.h 1307418393 /home/mark/projects/git/sleepyhead/src/libs/sleeplib/prs1_loader.h "machine.h" @@ -8312,7 +8312,7 @@ "preferences.h" "tinyxml/tinyxml.h" -1307463279 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadMain.cpp +1307464513 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadMain.cpp "wx_pch.h" "version.h" diff --git a/src/SleepyHeadMain.cpp b/src/SleepyHeadMain.cpp index e9f7125f..f2b8cd94 100644 --- a/src/SleepyHeadMain.cpp +++ b/src/SleepyHeadMain.cpp @@ -766,6 +766,8 @@ void Daily::RefreshData() CPAPMode mode; PRTypes pr; wxString epr,modestr; + float iap90,eap90; + if (cpap) { mode=(CPAPMode)cpap->summary_max(CPAP_Mode); @@ -854,8 +856,8 @@ void Daily::RefreshData() float vsi=cpap->count(CPAP_VSnore)/cpap->hours(); float fli=cpap->count(CPAP_FlowLimit)/cpap->hours(); // float p90=cpap->percentile(CPAP_Pressure,0,0.9); - float eap90=cpap->percentile(CPAP_EAP,0,0.9); - float iap90=cpap->percentile(CPAP_IAP,0,0.9); + eap90=cpap->percentile(CPAP_EAP,0,0.9); + iap90=cpap->percentile(CPAP_IAP,0,0.9); wxString submodel=_("Unknown Model"); @@ -906,28 +908,34 @@ void Daily::RefreshData() html=html+wxT("
\n"); //html=html+wxT("
\n"); - html=html+wxT("WhatMinAvgMax"); - if (mode==MODE_CPAP) { - html=html+wxT("")+_("Pressure")+wxT("")+wxString::Format(wxT("%.1fcmH2O"),cpap->summary_min(CPAP_PressureMin))+wxT("\n"); + if (mode==MODE_BIPAP) { + html=html+wxT("")+_("90% IPAP ")+wxString::Format(wxT("%.1fcmH2O"),iap90)+wxT("\n"); + html=html+wxT("")+_("90% EPAP ")+wxString::Format(wxT("%.1fcmH2O"),eap90)+wxT("\n"); } else if (mode==MODE_APAP) { + html=html+wxT("")+_("90% Pressure ")+wxString::Format(wxT("%.2fcmH2O"),cpap->summary_weighted_avg(CPAP_PressurePercentValue))+wxT("\n"); + } else if (mode==MODE_CPAP) { + html=html+wxT("")+_("Pressure ")+wxString::Format(wxT("%.2fcmH2O"),cpap->summary_min(CPAP_PressureMin))+wxT("\n"); + } + html=html+wxT(" \n"); + + html=html+wxT(" MinAvgMax"); + + if (mode==MODE_APAP) { html=html+wxT("Pressure")+wxString::Format(wxT("%.2f"),cpap->summary_min(CPAP_PressureMinAchieved)); html=html+wxT("")+wxString::Format(wxT("%.2f"),cpap->summary_weighted_avg(CPAP_PressureAverage)); html=html+wxT("")+wxString::Format(wxT("%.2f"),cpap->summary_max(CPAP_PressureMaxAchieved))+wxT(""); - /*html=html+wxT("")+_("90% Pressure")+wxT("")+wxString::Format(wxT("%.1fcmH2O"),cpap->summary_weighted_avg(CPAP_PressurePercentValue))+wxT("\n"); // html=html+wxT("")+_("90% Pressure")+wxT("")+wxString::Format(wxT("%.1fcmH2O"),p90)+wxT("\n"); } else if (mode==MODE_BIPAP) { html=html+wxT("IPAP")+wxString::Format(wxT("%.2f"),cpap->summary_min(BIPAP_IAPMin)); html=html+wxT("")+wxString::Format(wxT("%.2f"),cpap->summary_weighted_avg(BIPAP_IAPAverage)); html=html+wxT("")+wxString::Format(wxT("%.2f"),cpap->summary_max(BIPAP_IAPMax))+wxT(""); + html=html+wxT("EPAP")+wxString::Format(wxT("%.2f"),cpap->summary_min(BIPAP_EAPMin)); html=html+wxT("")+wxString::Format(wxT("%.2f"),cpap->summary_weighted_avg(BIPAP_EAPAverage)); html=html+wxT("")+wxString::Format(wxT("%.2f"),cpap->summary_max(BIPAP_EAPMax))+wxT(""); - html=html+wxT("")+_("90% IPAP")+wxT("")+wxString::Format(wxT("%.1fcmH2O"),iap90)+wxT("\n"); - html=html+wxT("")+_("90% EPAP")+wxT("")+wxString::Format(wxT("%.1fcmH2O"),eap90)+wxT("\n"); */ - } html=html+wxT("Leak"); //")+wxString::Format(wxT("%.2f"),cpap->summary_weighted_avg(CPAP_LeakAverage)) html=html+wxT("")+wxString::Format(wxT("%.2f"),cpap->summary_min(CPAP_LeakMinimum)); @@ -988,17 +996,18 @@ void Daily::RefreshData() if (cpap) { + if (mode==MODE_BIPAP) { + html=html+wxT("")+_("Time@IPAP")+wxT("\n"); html=html+wxT("\n"); html=html+wxT("")+_("Time@EPAP")+wxT("\n"); html=html+wxT("\n"); - } else { //if (mode==MODE_APAP) { + } else if (mode==MODE_APAP) { html=html+wxT("")+_("Time@Pressure")+wxT("\n"); html=html+wxT("\n"); } - html=html+wxT("
"); html=html+wxT("
"); html=html+wxT("\n"); diff --git a/src/version.h b/src/version.h index 55954cb1..c0984972 100644 --- a/src/version.h +++ b/src/version.h @@ -16,14 +16,14 @@ namespace AutoVersion{ //Standard Version Type static const long MAJOR = 0; static const long MINOR = 7; - static const long BUILD = 3621; - static const long REVISION = 3007; + static const long BUILD = 3643; + static const long REVISION = 3130; //Miscellaneous Version Types - static const long BUILDS_COUNT = 1247; - #define RC_FILEVERSION 0,7,3621,3007 - #define RC_FILEVERSION_STRING "0, 7, 3621, 3007\0" - static const char FULLVERSION_STRING[] = "0.7.3621.3007"; + static const long BUILDS_COUNT = 1297; + #define RC_FILEVERSION 0,7,3643,3130 + #define RC_FILEVERSION_STRING "0, 7, 3643, 3130\0" + static const char FULLVERSION_STRING[] = "0.7.3643.3130"; //These values are to keep track of your versioning state, don't modify them. static const long BUILD_HISTORY = 0;