diff --git a/Projects/CodeBlocks/SleepyHead.depend b/Projects/CodeBlocks/SleepyHead.depend index 150405ff..c7902147 100644 --- a/Projects/CodeBlocks/SleepyHead.depend +++ b/Projects/CodeBlocks/SleepyHead.depend @@ -8257,7 +8257,7 @@ "sleeplib/machine.h" "graphs/graph.h" -1307479084 /home/mark/projects/git/sleepyhead/src/libs/sleeplib/machine.h +1307479645 /home/mark/projects/git/sleepyhead/src/libs/sleeplib/machine.h @@ -8295,7 +8295,7 @@ -1307479192 /home/mark/projects/git/sleepyhead/src/version.h +1307479655 /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" -1307479191 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadMain.cpp +1307479655 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadMain.cpp "wx_pch.h" "version.h" @@ -8380,7 +8380,7 @@ "machine_loader.h" "tinyxml/tinyxml.h" -1307479109 source:/home/mark/projects/git/sleepyhead/src/libs/sleeplib/prs1_loader.cpp +1307479631 source:/home/mark/projects/git/sleepyhead/src/libs/sleeplib/prs1_loader.cpp diff --git a/src/SleepyHeadMain.cpp b/src/SleepyHeadMain.cpp index dadeb65d..c76a5200 100644 --- a/src/SleepyHeadMain.cpp +++ b/src/SleepyHeadMain.cpp @@ -615,7 +615,7 @@ Daily::Daily(wxWindow *win,Profile *p) SPO2->LinkZoom(PULSE); PULSE->LinkZoom(SPO2); - AddCPAPData(snore=new EventData(PRS1_VSnoreGraph,0)); + AddCPAPData(snore=new EventData(CPAP_SnoreGraph,0)); //snore->ForceMinY(0); //snore->ForceMaxY(15); @@ -749,6 +749,7 @@ void Daily::OnEventTreeSelection( wxTreeEvent& event ) SF->SetXBounds(st,et); PRD->SetXBounds(st,et); LEAK->SetXBounds(st,et); + SNORE->SetXBounds(st,et); } } @@ -993,6 +994,7 @@ void Daily::RefreshData() PRD->Show(true); LEAK->Show(true); SF->Show(true); + SNORE->Show(true); } else { html+=_("No CPAP data available"); html=html+wxT("  \n"); @@ -1004,6 +1006,7 @@ void Daily::RefreshData() PRD->Show(false); LEAK->Show(false); SF->Show(false); + SNORE->Show(false); } if (oxi) { html=html+wxT("Pulse"); diff --git a/src/libs/sleeplib/machine.h b/src/libs/sleeplib/machine.h index 3a8f0686..fc41694f 100644 --- a/src/libs/sleeplib/machine.h +++ b/src/libs/sleeplib/machine.h @@ -51,13 +51,14 @@ enum MachineCode//:wxInt16 CPAP_PressureReliefSetting, CPAP_HumidifierSetting, CPAP_HumidifierStatus, CPAP_PressureMinAchieved, CPAP_PressureMaxAchieved, CPAP_PressurePercentValue, CPAP_PressurePercentName, CPAP_PressureAverage, CPAP_PressureMedian, CPAP_LeakMedian,CPAP_LeakMinimum,CPAP_LeakMaximum,CPAP_LeakAverage,CPAP_Duration, + CPAP_SnoreGraph, CPAP_SnoreMinimum, CPAP_SnoreMaximum, CPAP_SnoreAverage, CPAP_SnoreMedian, BIPAP_EAPAverage,BIPAP_IAPAverage,BIPAP_EAPMin,BIPAP_EAPMax,BIPAP_IAPMin,BIPAP_IAPMax,CPAP_BrokenSummary, // PRS1 Specific Codes PRS1_PressurePulse=0x1000, PRS1_VSnore2, PRS1_Unknown00, PRS1_Unknown01, PRS1_Unknown08, PRS1_Unknown09, PRS1_Unknown0B, PRS1_Unknown0E, PRS1_Unknown10, PRS1_Unknown12, - PRS1_SystemLockStatus, PRS1_SystemResistanceStatus, PRS1_SystemResistanceSetting, PRS1_HoseDiameter, PRS1_AutoOff, PRS1_MaskAlert, PRS1_ShowAHI, PRS1_VSnoreGraph, + PRS1_SystemLockStatus, PRS1_SystemResistanceStatus, PRS1_SystemResistanceSetting, PRS1_HoseDiameter, PRS1_AutoOff, PRS1_MaskAlert, PRS1_ShowAHI, // Oximeter Codes OXI_Pulse=0x2000, OXI_SPO2, OXI_Plethy, OXI_Signal2, OXI_SignalGood, OXI_PulseAverage, OXI_PulseMin, OXI_PulseMax, OXI_SPO2Average, OXI_SPO2Min, OXI_SPO2Max, diff --git a/src/libs/sleeplib/prs1_loader.cpp b/src/libs/sleeplib/prs1_loader.cpp index f46db8a9..3f4edbd4 100644 --- a/src/libs/sleeplib/prs1_loader.cpp +++ b/src/libs/sleeplib/prs1_loader.cpp @@ -342,6 +342,11 @@ int PRS1Loader::OpenMachine(Machine *m,wxString path,Profile *profile) sess->summary[CPAP_LeakMedian]=sess->avg_event_field(CPAP_Leak,0); sess->summary[CPAP_LeakAverage]=sess->weighted_avg_event_field(CPAP_Leak,0); + sess->summary[CPAP_SnoreMinimum]=sess->min_event_field(CPAP_SnoreGraph,0); + sess->summary[CPAP_SnoreMaximum]=sess->max_event_field(CPAP_SnoreGraph,0); + sess->summary[CPAP_SnoreMedian]=sess->avg_event_field(CPAP_SnoreGraph,0); + sess->summary[CPAP_SnoreAverage]=sess->weighted_avg_event_field(CPAP_SnoreGraph,0); + //wxPrintf(sess->start().Format()+wxT(" avgsummary=%.3f avgmine=%.3f\n"),sess->summary[CPAP_PressureAverage].GetDouble(),sess->weighted_avg_event_field(CPAP_Pressure,0)); sess->SetChanged(true); } @@ -530,7 +535,7 @@ bool PRS1Loader::Parse002(Session *session,unsigned char *buffer,int size,time_t data[1]=buffer[pos++]; if (code==0x11) { session->AddEvent(new Event(t,cpapcode, data,1)); - session->AddEvent(new Event(t,PRS1_VSnoreGraph,&data[1],1)); + session->AddEvent(new Event(t,CPAP_SnoreGraph,&data[1],1)); if (data[1]>0) { session->AddEvent(new Event(t,PRS1_VSnore2, &data[1],1)); } diff --git a/src/version.h b/src/version.h index 16afe8bb..31e3bb61 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 = 3685; - static const long REVISION = 3364; + static const long BUILD = 3687; + static const long REVISION = 3377; //Miscellaneous Version Types - static const long BUILDS_COUNT = 1421; - #define RC_FILEVERSION 0,7,3685,3364 - #define RC_FILEVERSION_STRING "0, 7, 3685, 3364\0" - static const char FULLVERSION_STRING[] = "0.7.3685.3364"; + static const long BUILDS_COUNT = 1425; + #define RC_FILEVERSION 0,7,3687,3377 + #define RC_FILEVERSION_STRING "0, 7, 3687, 3377\0" + static const char FULLVERSION_STRING[] = "0.7.3687.3377"; //These values are to keep track of your versioning state, don't modify them. static const long BUILD_HISTORY = 0;