Added Snore Graph

This commit is contained in:
Mark Watkins 2011-06-08 06:40:53 +10:00
parent 9337885013
commit ceb22325c2
7 changed files with 46 additions and 30 deletions

View File

@ -8249,7 +8249,7 @@
1307418393 /home/mark/projects/git/sleepyhead/src/SleepyHeadApp.h
<wx/app.h>
1307470130 /home/mark/projects/git/sleepyhead/src/SleepyHeadMain.h
1307477974 /home/mark/projects/git/sleepyhead/src/SleepyHeadMain.h
<wx/listbox.h>
<wx/treectrl.h>
"SleepyHeadApp.h"
@ -8257,7 +8257,7 @@
"sleeplib/machine.h"
"graphs/graph.h"
1307418393 /home/mark/projects/git/sleepyhead/src/libs/sleeplib/machine.h
1307479084 /home/mark/projects/git/sleepyhead/src/libs/sleeplib/machine.h
<wx/string.h>
<wx/variant.h>
<wx/dir.h>
@ -8295,7 +8295,7 @@
<sleeplib/machine.h>
<list>
1307470976 /home/mark/projects/git/sleepyhead/src/version.h
1307479192 /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"
1307470970 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadMain.cpp
1307479191 source:/home/mark/projects/git/sleepyhead/src/SleepyHeadMain.cpp
"wx_pch.h"
"version.h"
<wx/app.h>
@ -8332,7 +8332,7 @@
"sleeplib/profiles.h"
"sleeplib/machine_loader.h"
1307466914 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
1307473982 source:/home/mark/projects/git/sleepyhead/src/graphs/graph.cpp
<wx/settings.h>
<wx/dcbuffer.h>
<wx/log.h>
@ -8380,7 +8380,7 @@
"machine_loader.h"
"tinyxml/tinyxml.h"
1307418393 source:/home/mark/projects/git/sleepyhead/src/libs/sleeplib/prs1_loader.cpp
1307479109 source:/home/mark/projects/git/sleepyhead/src/libs/sleeplib/prs1_loader.cpp
<wx/dir.h>
<wx/filename.h>
<wx/ffile.h>

View File

@ -1,25 +1,28 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<ActiveTarget name="Debug" />
<File name="../../src/GUIFrame.cpp" open="1" top="0" tabpos="14">
<ActiveTarget name="Windows" />
<File name="../../src/GUIFrame.cpp" open="0" top="0" tabpos="14">
<Cursor position="1300" topLine="24" />
</File>
<File name="../../src/GUIFrame.h" open="1" top="0" tabpos="11">
<Cursor position="0" topLine="33" />
</File>
<File name="../../src/SleepyHeadApp.cpp" open="1" top="0" tabpos="1">
<Cursor position="1042" topLine="7" />
</File>
<File name="../../src/SleepyHeadMain.cpp" open="1" top="1" tabpos="2">
<Cursor position="5636" topLine="191" />
<File name="../../src/SleepyHeadMain.cpp" open="1" top="0" tabpos="2">
<Cursor position="45006" topLine="1004" />
</File>
<File name="../../src/SleepyHeadMain.h" open="1" top="0" tabpos="3">
<Cursor position="546" topLine="42" />
<Cursor position="2540" topLine="75" />
</File>
<File name="../../src/graphs/graph.cpp" open="1" top="0" tabpos="9">
<Cursor position="44361" topLine="1645" />
<File name="../../src/graphs/graph.cpp" open="1" top="1" tabpos="9">
<Cursor position="9786" topLine="365" />
</File>
<File name="../../src/graphs/graph.h" open="1" top="0" tabpos="10">
<Cursor position="12935" topLine="338" />
</File>
<File name="../../src/libs/sleeplib/binary_file.cpp" open="1" top="0" tabpos="11">
<File name="../../src/libs/sleeplib/binary_file.cpp" open="0" top="0" tabpos="11">
<Cursor position="7148" topLine="269" />
</File>
<File name="../../src/libs/sleeplib/loader_plugins/cms50_loader.cpp" open="1" top="0" tabpos="4">
@ -34,10 +37,10 @@
<File name="../../src/libs/sleeplib/machine.h" open="1" top="0" tabpos="6">
<Cursor position="2133" topLine="25" />
</File>
<File name="../../src/libs/sleeplib/profiles.cpp" open="1" top="0" tabpos="12">
<File name="../../src/libs/sleeplib/profiles.cpp" open="0" top="0" tabpos="12">
<Cursor position="4619" topLine="141" />
</File>
<File name="../../src/libs/sleeplib/profiles.h" open="1" top="0" tabpos="13">
<File name="../../src/libs/sleeplib/profiles.h" open="0" top="0" tabpos="13">
<Cursor position="757" topLine="15" />
</File>
<File name="../../src/libs/sleeplib/prs1_loader.cpp" open="1" top="0" tabpos="7">

View File

@ -80,8 +80,11 @@ SleepyHeadFrame::SleepyHeadFrame(wxFrame *frame)
}
UpdateProfiles();
if (pref.Exists("ShowSerialNumbers")) ViewMenuSerial->Check(pref["ShowSerialNumbers"]);
if (pref.Exists("fruitsalad")) ViewMenuFruitsalad->Check(pref["fruitsalad"]); else pref["fruitsalad"]=true;
if (!pref.Exists("ShowSerialNumbers")) pref["ShowSerialNumbers"]=false;
if (!pref.Exists("fruitsalad")) pref["fruitsalad"]=true;
ViewMenuSerial->Check(pref["ShowSerialNumbers"]);
ViewMenuFruitsalad->Check(pref["fruitsalad"]);
// wxDisableAsserts();
@ -612,6 +615,13 @@ Daily::Daily(wxWindow *win,Profile *p)
SPO2->LinkZoom(PULSE);
PULSE->LinkZoom(SPO2);
AddCPAPData(snore=new EventData(PRS1_VSnoreGraph,0));
//snore->ForceMinY(0);
//snore->ForceMaxY(15);
SNORE=new gGraphWindow(ScrolledWindow,-1,wxT("Snore"),wxPoint(0,0), wxSize(600,130), wxNO_BORDER);
SNORE->AddLayer(new gLineChart(snore,wxDARK_GREY,4096,false,false,true));
SNORE->AddLayer(new gXAxis(wxBLACK));
AddCPAPData(leakdata=new EventData(CPAP_Leak,0));
//leakdata->ForceMinY(0);
@ -686,6 +696,7 @@ Daily::Daily(wxWindow *win,Profile *p)
fgSizer->Add(FRW,1,wxEXPAND);
fgSizer->Add(PRD,1,wxEXPAND);
fgSizer->Add(LEAK,1,wxEXPAND);
fgSizer->Add(SNORE,1,wxEXPAND);
fgSizer->Add(PULSE,1,wxEXPAND);
fgSizer->Add(SPO2,1,wxEXPAND);
G_AHI->Hide();

View File

@ -72,10 +72,10 @@ protected:
void UpdateOXIGraphs(Day *day);
bool foobar_datehack;
gPointData *tap,*tap_eap,*tap_iap,*g_ahi,*frw,*prd,*leakdata,*pressure_iap,*pressure_eap;
gPointData *tap,*tap_eap,*tap_iap,*g_ahi,*frw,*prd,*leakdata,*pressure_iap,*pressure_eap,*snore;
gPointData *pulse,*spo2;
gPointData *flags[10];
gGraphWindow *PRD,*FRW,*G_AHI,*TAP,*LEAK,*SF,*TAP_EAP,*TAP_IAP,*PULSE,*SPO2;
gGraphWindow *PRD,*FRW,*G_AHI,*TAP,*LEAK,*SF,*TAP_EAP,*TAP_IAP,*PULSE,*SPO2,*SNORE;
Profile *profile;
list<gPointData *> OXIData;

View File

@ -57,7 +57,7 @@ enum MachineCode//:wxInt16
// 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_SystemLockStatus, PRS1_SystemResistanceStatus, PRS1_SystemResistanceSetting, PRS1_HoseDiameter, PRS1_AutoOff, PRS1_MaskAlert, PRS1_ShowAHI, PRS1_VSnoreGraph,
// 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,

View File

@ -516,8 +516,9 @@ bool PRS1Loader::Parse002(Session *session,unsigned char *buffer,int size,time_t
case 0x07: // Clear Airway
case 0x0a: // Hypopnea
case 0x0c: // Flow Limitation
data[0]=buffer[pos];
tt-=wxTimeSpan::Seconds((buffer[pos++])); // Subtract Time Offset
session->AddEvent(new Event(tt,cpapcode,data,0));
session->AddEvent(new Event(tt,cpapcode,data,1));
break;
case 0x0d: // Vibratory Snore
session->AddEvent(new Event(t,cpapcode, data,0));
@ -528,9 +529,10 @@ bool PRS1Loader::Parse002(Session *session,unsigned char *buffer,int size,time_t
data[0]=buffer[pos++];
data[1]=buffer[pos++];
if (code==0x11) {
session->AddEvent(new Event(t,cpapcode, data,2));
session->AddEvent(new Event(t,cpapcode, data,1));
session->AddEvent(new Event(t,PRS1_VSnoreGraph,&data[1],1));
if (data[1]>0) {
session->AddEvent(new Event(tt,PRS1_VSnore2, &data[1],1));
session->AddEvent(new Event(t,PRS1_VSnore2, &data[1],1));
}
} else if (code==0x03) {
data[0]/=10.0;

View File

@ -16,14 +16,14 @@ namespace AutoVersion{
//Standard Version Type
static const long MAJOR = 0;
static const long MINOR = 7;
static const long BUILD = 3666;
static const long REVISION = 3258;
static const long BUILD = 3685;
static const long REVISION = 3364;
//Miscellaneous Version Types
static const long BUILDS_COUNT = 1369;
#define RC_FILEVERSION 0,7,3666,3258
#define RC_FILEVERSION_STRING "0, 7, 3666, 3258\0"
static const char FULLVERSION_STRING[] = "0.7.3666.3258";
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";
//These values are to keep track of your versioning state, don't modify them.
static const long BUILD_HISTORY = 0;