mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
BIPAP, loader & graph improvements
This commit is contained in:
parent
3bcb6ec453
commit
f5352333db
@ -7835,7 +7835,7 @@
|
|||||||
"sleeplib/machine.h"
|
"sleeplib/machine.h"
|
||||||
"graphs/graph.h"
|
"graphs/graph.h"
|
||||||
|
|
||||||
1306485972 /home/mark/projects/git/sleepyhead/libs/sleeplib/machine.h
|
1306601639 /home/mark/projects/git/sleepyhead/libs/sleeplib/machine.h
|
||||||
<wx/string.h>
|
<wx/string.h>
|
||||||
<wx/variant.h>
|
<wx/variant.h>
|
||||||
<wx/dir.h>
|
<wx/dir.h>
|
||||||
@ -7873,7 +7873,7 @@
|
|||||||
<sleeplib/machine.h>
|
<sleeplib/machine.h>
|
||||||
<list>
|
<list>
|
||||||
|
|
||||||
1306587675 /home/mark/projects/git/sleepyhead/version.h
|
1306639384 /home/mark/projects/git/sleepyhead/version.h
|
||||||
|
|
||||||
1306549105 /home/mark/projects/git/sleepyhead/libs/sleeplib/prs1_loader.h
|
1306549105 /home/mark/projects/git/sleepyhead/libs/sleeplib/prs1_loader.h
|
||||||
"machine.h"
|
"machine.h"
|
||||||
@ -7890,7 +7890,7 @@
|
|||||||
"preferences.h"
|
"preferences.h"
|
||||||
"tinyxml/tinyxml.h"
|
"tinyxml/tinyxml.h"
|
||||||
|
|
||||||
1306587675 source:/home/mark/projects/git/sleepyhead/SleepyHeadMain.cpp
|
1306638297 source:/home/mark/projects/git/sleepyhead/SleepyHeadMain.cpp
|
||||||
"wx_pch.h"
|
"wx_pch.h"
|
||||||
"version.h"
|
"version.h"
|
||||||
<wx/app.h>
|
<wx/app.h>
|
||||||
@ -7905,7 +7905,7 @@
|
|||||||
"SleepyHeadMain.h"
|
"SleepyHeadMain.h"
|
||||||
"sleeplib/profiles.h"
|
"sleeplib/profiles.h"
|
||||||
|
|
||||||
1306587051 source:/home/mark/projects/git/sleepyhead/graphs/graph.cpp
|
1306639142 source:/home/mark/projects/git/sleepyhead/graphs/graph.cpp
|
||||||
<wx/settings.h>
|
<wx/settings.h>
|
||||||
<wx/dcbuffer.h>
|
<wx/dcbuffer.h>
|
||||||
<wx/log.h>
|
<wx/log.h>
|
||||||
@ -7919,7 +7919,7 @@
|
|||||||
<wx/ffile.h>
|
<wx/ffile.h>
|
||||||
<wx/utils.h>
|
<wx/utils.h>
|
||||||
|
|
||||||
1306560805 source:/home/mark/projects/git/sleepyhead/libs/sleeplib/machine.cpp
|
1306614082 source:/home/mark/projects/git/sleepyhead/libs/sleeplib/machine.cpp
|
||||||
<tr1/random>
|
<tr1/random>
|
||||||
<wx/colour.h>
|
<wx/colour.h>
|
||||||
<wx/log.h>
|
<wx/log.h>
|
||||||
@ -7951,7 +7951,7 @@
|
|||||||
"machine_loader.h"
|
"machine_loader.h"
|
||||||
"tinyxml/tinyxml.h"
|
"tinyxml/tinyxml.h"
|
||||||
|
|
||||||
1306560504 source:/home/mark/projects/git/sleepyhead/libs/sleeplib/prs1_loader.cpp
|
1306607755 source:/home/mark/projects/git/sleepyhead/libs/sleeplib/prs1_loader.cpp
|
||||||
<wx/dir.h>
|
<wx/dir.h>
|
||||||
<wx/filename.h>
|
<wx/filename.h>
|
||||||
<wx/ffile.h>
|
<wx/ffile.h>
|
||||||
|
@ -4,17 +4,17 @@
|
|||||||
<File name="GUIFrame.cpp" open="0" top="0" tabpos="7">
|
<File name="GUIFrame.cpp" open="0" top="0" tabpos="7">
|
||||||
<Cursor position="1774" topLine="0" />
|
<Cursor position="1774" topLine="0" />
|
||||||
</File>
|
</File>
|
||||||
<File name="SleepyHeadApp.cpp" open="0" top="0" tabpos="12">
|
<File name="SleepyHeadApp.cpp" open="1" top="1" tabpos="9">
|
||||||
<Cursor position="308" topLine="0" />
|
<Cursor position="1346" topLine="14" />
|
||||||
</File>
|
</File>
|
||||||
<File name="SleepyHeadMain.cpp" open="1" top="0" tabpos="3">
|
<File name="SleepyHeadMain.cpp" open="1" top="0" tabpos="3">
|
||||||
<Cursor position="6531" topLine="189" />
|
<Cursor position="14754" topLine="408" />
|
||||||
</File>
|
</File>
|
||||||
<File name="SleepyHeadMain.h" open="1" top="0" tabpos="4">
|
<File name="SleepyHeadMain.h" open="1" top="0" tabpos="4">
|
||||||
<Cursor position="2066" topLine="34" />
|
<Cursor position="2066" topLine="34" />
|
||||||
</File>
|
</File>
|
||||||
<File name="graphs/graph.cpp" open="1" top="1" tabpos="6">
|
<File name="graphs/graph.cpp" open="1" top="0" tabpos="6">
|
||||||
<Cursor position="50306" topLine="1898" />
|
<Cursor position="41086" topLine="1510" />
|
||||||
</File>
|
</File>
|
||||||
<File name="graphs/graph.h" open="1" top="0" tabpos="5">
|
<File name="graphs/graph.h" open="1" top="0" tabpos="5">
|
||||||
<Cursor position="10773" topLine="300" />
|
<Cursor position="10773" topLine="300" />
|
||||||
@ -26,10 +26,10 @@
|
|||||||
<Cursor position="0" topLine="0" />
|
<Cursor position="0" topLine="0" />
|
||||||
</File>
|
</File>
|
||||||
<File name="libs/sleeplib/machine.cpp" open="1" top="0" tabpos="1">
|
<File name="libs/sleeplib/machine.cpp" open="1" top="0" tabpos="1">
|
||||||
<Cursor position="8909" topLine="247" />
|
<Cursor position="4755" topLine="129" />
|
||||||
</File>
|
</File>
|
||||||
<File name="libs/sleeplib/machine.h" open="1" top="0" tabpos="2">
|
<File name="libs/sleeplib/machine.h" open="1" top="0" tabpos="2">
|
||||||
<Cursor position="108" topLine="0" />
|
<Cursor position="6107" topLine="197" />
|
||||||
</File>
|
</File>
|
||||||
<File name="libs/sleeplib/machine_loader.cpp" open="0" top="0" tabpos="8">
|
<File name="libs/sleeplib/machine_loader.cpp" open="0" top="0" tabpos="8">
|
||||||
<Cursor position="0" topLine="0" />
|
<Cursor position="0" topLine="0" />
|
||||||
@ -50,7 +50,7 @@
|
|||||||
<Cursor position="28" topLine="0" />
|
<Cursor position="28" topLine="0" />
|
||||||
</File>
|
</File>
|
||||||
<File name="libs/sleeplib/prs1_loader.cpp" open="1" top="0" tabpos="7">
|
<File name="libs/sleeplib/prs1_loader.cpp" open="1" top="0" tabpos="7">
|
||||||
<Cursor position="8353" topLine="249" />
|
<Cursor position="15901" topLine="250" />
|
||||||
</File>
|
</File>
|
||||||
<File name="libs/sleeplib/prs1_loader.h" open="1" top="0" tabpos="8">
|
<File name="libs/sleeplib/prs1_loader.h" open="1" top="0" tabpos="8">
|
||||||
<Cursor position="1115" topLine="0" />
|
<Cursor position="1115" topLine="0" />
|
||||||
|
@ -62,48 +62,6 @@ wxString wxbuildinfo(wxbuildinfoformat format)
|
|||||||
return wxbuild;
|
return wxbuild;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SleepyHeadFrame::DoScreenshot( wxCommandEvent &event )
|
|
||||||
{
|
|
||||||
wxRect r=GetRect();
|
|
||||||
|
|
||||||
#if defined(__UNIX__)
|
|
||||||
int cx=r.x, cy=r.y;
|
|
||||||
ClientToScreen(&cx,&cy);
|
|
||||||
int border_width = cx - r.x;
|
|
||||||
int title_bar_height = cy - r.y;
|
|
||||||
r.width += (border_width * 2);
|
|
||||||
r.height += title_bar_height + border_width;
|
|
||||||
#endif
|
|
||||||
int x=r.x;
|
|
||||||
int y=r.y;
|
|
||||||
int w=r.width;
|
|
||||||
int h=r.height;
|
|
||||||
|
|
||||||
wxScreenDC sdc;
|
|
||||||
wxMemoryDC mdc;
|
|
||||||
|
|
||||||
wxBitmap bmp(r.width, r.height,-1);
|
|
||||||
//wxBitMap *bmp=wxEmptyImage(r.width,r.height);
|
|
||||||
mdc.SelectObject(bmp);
|
|
||||||
|
|
||||||
mdc.Blit((wxCoord)0, (wxCoord)0, (wxCoord)r.width, (wxCoord)r.height, &sdc, (wxCoord)r.x, (wxCoord)r.y);
|
|
||||||
|
|
||||||
mdc.SelectObject(wxNullBitmap);
|
|
||||||
|
|
||||||
wxDateTime d=wxDateTime::Now();
|
|
||||||
|
|
||||||
// wxDirDialog sfs(this,_("Choose a Directory")); //,wxT(""),wxT(""),style=wxFD_OPEN);
|
|
||||||
wxString filename=wxSaveFileSelector(_("Please give a filename for the screenshot"),wxT("png"),wxT("Sleepyhead-")+d.Format(wxT("%Y%m%d-%H%M%S")),this);
|
|
||||||
if (!filename.IsEmpty()) {
|
|
||||||
if (!filename.Lower().EndsWith(wxT(".png"))) filename+=wxT(".png");
|
|
||||||
wxImage img=bmp.ConvertToImage();
|
|
||||||
if (!img.SaveFile(filename, wxBITMAP_TYPE_PNG)) {
|
|
||||||
wxLogError(wxT("Couldn't save screenshot ")+filename);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
SleepyHeadFrame::SleepyHeadFrame(wxFrame *frame)
|
SleepyHeadFrame::SleepyHeadFrame(wxFrame *frame)
|
||||||
: GUIFrame(frame)
|
: GUIFrame(frame)
|
||||||
@ -133,19 +91,21 @@ SleepyHeadFrame::SleepyHeadFrame(wxFrame *frame)
|
|||||||
id=pref[wxT("DefaultMachine")].GetInteger();
|
id=pref[wxT("DefaultMachine")].GetInteger();
|
||||||
}
|
}
|
||||||
|
|
||||||
Machine *m=cpap_machines[id];
|
if (id<cpap_machines.size()) {
|
||||||
|
Machine *m=cpap_machines[id];
|
||||||
|
|
||||||
int idx=main_auinotebook->GetPageIndex(daily);
|
int idx=main_auinotebook->GetPageIndex(daily);
|
||||||
if (idx!=wxNOT_FOUND) {
|
if (idx!=wxNOT_FOUND) {
|
||||||
daily->RefreshData(m);
|
daily->RefreshData(m);
|
||||||
|
}
|
||||||
|
idx=main_auinotebook->GetPageIndex(summary);
|
||||||
|
if (idx!=wxNOT_FOUND) {
|
||||||
|
summary->RefreshData(m);
|
||||||
|
}
|
||||||
|
summary->Refresh();
|
||||||
|
daily->Refresh();
|
||||||
|
Refresh();
|
||||||
}
|
}
|
||||||
idx=main_auinotebook->GetPageIndex(summary);
|
|
||||||
if (idx!=wxNOT_FOUND) {
|
|
||||||
summary->RefreshData(m);
|
|
||||||
}
|
|
||||||
summary->Refresh();
|
|
||||||
daily->Refresh();
|
|
||||||
Refresh();
|
|
||||||
|
|
||||||
|
|
||||||
this->Connect(wxID_ANY, wxEVT_DO_SCREENSHOT, wxCommandEventHandler(SleepyHeadFrame::DoScreenshot));
|
this->Connect(wxID_ANY, wxEVT_DO_SCREENSHOT, wxCommandEventHandler(SleepyHeadFrame::DoScreenshot));
|
||||||
@ -246,6 +206,47 @@ void SleepyHeadFrame::OnScreenshot(wxCommandEvent& event)
|
|||||||
wxCommandEvent MyEvent( wxEVT_DO_SCREENSHOT);
|
wxCommandEvent MyEvent( wxEVT_DO_SCREENSHOT);
|
||||||
wxPostEvent(this, MyEvent);
|
wxPostEvent(this, MyEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SleepyHeadFrame::DoScreenshot( wxCommandEvent &event )
|
||||||
|
{
|
||||||
|
wxRect r=GetRect();
|
||||||
|
|
||||||
|
#if defined(__UNIX__)
|
||||||
|
int cx=r.x, cy=r.y;
|
||||||
|
ClientToScreen(&cx,&cy);
|
||||||
|
int border_width = cx - r.x;
|
||||||
|
int title_bar_height = cy - r.y;
|
||||||
|
r.width += (border_width * 2);
|
||||||
|
r.height += title_bar_height + border_width;
|
||||||
|
#endif
|
||||||
|
int x=r.x;
|
||||||
|
int y=r.y;
|
||||||
|
int w=r.width;
|
||||||
|
int h=r.height;
|
||||||
|
|
||||||
|
wxScreenDC sdc;
|
||||||
|
wxMemoryDC mdc;
|
||||||
|
|
||||||
|
wxBitmap bmp(r.width, r.height,-1);
|
||||||
|
//wxBitMap *bmp=wxEmptyImage(r.width,r.height);
|
||||||
|
mdc.SelectObject(bmp);
|
||||||
|
|
||||||
|
mdc.Blit((wxCoord)0, (wxCoord)0, (wxCoord)r.width, (wxCoord)r.height, &sdc, (wxCoord)r.x, (wxCoord)r.y);
|
||||||
|
|
||||||
|
mdc.SelectObject(wxNullBitmap);
|
||||||
|
|
||||||
|
wxDateTime d=wxDateTime::Now();
|
||||||
|
|
||||||
|
// wxDirDialog sfs(this,_("Choose a Directory")); //,wxT(""),wxT(""),style=wxFD_OPEN);
|
||||||
|
wxString filename=wxSaveFileSelector(_("Please give a filename for the screenshot"),wxT("png"),wxT("Sleepyhead-")+d.Format(wxT("%Y%m%d-%H%M%S")),this);
|
||||||
|
if (!filename.IsEmpty()) {
|
||||||
|
if (!filename.Lower().EndsWith(wxT(".png"))) filename+=wxT(".png");
|
||||||
|
wxImage img=bmp.ConvertToImage();
|
||||||
|
if (!img.SaveFile(filename, wxBITMAP_TYPE_PNG)) {
|
||||||
|
wxLogError(wxT("Couldn't save screenshot ")+filename);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SleepyHeadFrame::OnAbout(wxCommandEvent &event)
|
void SleepyHeadFrame::OnAbout(wxCommandEvent &event)
|
||||||
{
|
{
|
||||||
@ -458,6 +459,7 @@ Daily::Daily(wxWindow *win)
|
|||||||
AddData(flags[9]=new FlagData(PRS1_Unknown0E,1));
|
AddData(flags[9]=new FlagData(PRS1_Unknown0E,1));
|
||||||
|
|
||||||
FRW->AddLayer(new gLineChart(frw,wxBLACK,200000,true));
|
FRW->AddLayer(new gLineChart(frw,wxBLACK,200000,true));
|
||||||
|
/* FRW->AddLayer(new gLineOverlayBar(flags[0],wxGREEN2,wxT("CSR")));
|
||||||
FRW->AddLayer(new gLineOverlayBar(flags[7],wxRED,wxT("PR"),LOT_Dot));
|
FRW->AddLayer(new gLineOverlayBar(flags[7],wxRED,wxT("PR"),LOT_Dot));
|
||||||
FRW->AddLayer(new gLineOverlayBar(flags[6],wxYELLOW,wxT("RE")));
|
FRW->AddLayer(new gLineOverlayBar(flags[6],wxYELLOW,wxT("RE")));
|
||||||
FRW->AddLayer(new gLineOverlayBar(flags[9],wxDARK_GREEN,wxT("U0E")));
|
FRW->AddLayer(new gLineOverlayBar(flags[9],wxDARK_GREEN,wxT("U0E")));
|
||||||
@ -465,16 +467,15 @@ Daily::Daily(wxWindow *win)
|
|||||||
FRW->AddLayer(new gLineOverlayBar(flags[4],wxBLACK,wxT("FL")));
|
FRW->AddLayer(new gLineOverlayBar(flags[4],wxBLACK,wxT("FL")));
|
||||||
FRW->AddLayer(new gLineOverlayBar(flags[3],wxBLUE,wxT("H")));
|
FRW->AddLayer(new gLineOverlayBar(flags[3],wxBLUE,wxT("H")));
|
||||||
FRW->AddLayer(new gLineOverlayBar(flags[2],wxAQUA,wxT("OA")));
|
FRW->AddLayer(new gLineOverlayBar(flags[2],wxAQUA,wxT("OA")));
|
||||||
FRW->AddLayer(new gLineOverlayBar(flags[1],wxPURPLE,wxT("CA")));
|
FRW->AddLayer(new gLineOverlayBar(flags[1],wxPURPLE,wxT("CA"))); */
|
||||||
FRW->AddLayer(new gLineOverlayBar(flags[0],wxGREEN2,wxT("CSR")));
|
|
||||||
|
|
||||||
SF=new gGraphWindow(ScrolledWindow,-1,wxT("Sleep Flags"),wxPoint(0,0), wxSize(600,150), wxNO_BORDER);
|
SF=new gGraphWindow(ScrolledWindow,-1,wxT("Sleep Flags"),wxPoint(0,0), wxSize(600,150), wxNO_BORDER);
|
||||||
SF->SetMargins(10,15,20,80);
|
SF->SetMargins(10,15,20,80);
|
||||||
|
|
||||||
SF->LinkZoom(FRW);
|
// SF->LinkZoom(FRW);
|
||||||
#if defined(__UNIX__)
|
#if defined(__UNIX__)
|
||||||
SF->LinkZoom(PRD); // Uncomment to link in more graphs.. Too slow on windows.
|
// SF->LinkZoom(PRD); // Uncomment to link in more graphs.. Too slow on windows.
|
||||||
SF->LinkZoom(LEAK);
|
// SF->LinkZoom(LEAK);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const int sfc=9;
|
const int sfc=9;
|
||||||
|
@ -11,10 +11,10 @@ License: LGPL
|
|||||||
#include "graph.h"
|
#include "graph.h"
|
||||||
|
|
||||||
#if !wxCHECK_VERSION(2,9,0)
|
#if !wxCHECK_VERSION(2,9,0)
|
||||||
wxColor zwxYELLOW=wxColor(0xc0,0xc0,0x40,0xff);
|
wxColor zwxYELLOW=wxColor(0xb0,0xb0,0x40,0xff);
|
||||||
wxColor *wxYELLOW=&zwxYELLOW;
|
wxColor *wxYELLOW=&zwxYELLOW;
|
||||||
#endif
|
#endif
|
||||||
wxColor zwxAQUA=wxColor(0x00,0xff,0xff,0xff);
|
wxColor zwxAQUA=wxColor(0x00,0xaf,0xbf,0xff);
|
||||||
wxColor * wxAQUA=&zwxAQUA;
|
wxColor * wxAQUA=&zwxAQUA;
|
||||||
wxColor zwxPURPLE=wxColor(0xff,0x40,0xff,0xff);
|
wxColor zwxPURPLE=wxColor(0xff,0x40,0xff,0xff);
|
||||||
wxColor * wxPURPLE=&zwxPURPLE;
|
wxColor * wxPURPLE=&zwxPURPLE;
|
||||||
@ -407,7 +407,7 @@ double gGraphWindow::MinX()
|
|||||||
val=(*l)->MinX();
|
val=(*l)->MinX();
|
||||||
first=false;
|
first=false;
|
||||||
} else {
|
} else {
|
||||||
if (val > (*l)->MinX()) val = (*l)->MinX();
|
if ((*l)->MinX() < val) val = (*l)->MinX();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ double gGraphWindow::MaxX()
|
|||||||
val=(*l)->MaxX();
|
val=(*l)->MaxX();
|
||||||
first=false;
|
first=false;
|
||||||
} else {
|
} else {
|
||||||
if (val < (*l)->MinX()) val = (*l)->MaxX();
|
if ((*l)->MaxX() > val) val = (*l)->MaxX();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return max_x=val;
|
return max_x=val;
|
||||||
@ -444,7 +444,7 @@ double gGraphWindow::MinY()
|
|||||||
val=(*l)->MinY();
|
val=(*l)->MinY();
|
||||||
first=false;
|
first=false;
|
||||||
} else {
|
} else {
|
||||||
if (val > (*l)->MinX()) val = (*l)->MinY();
|
if ((*l)->MinY() < val) val = (*l)->MinY();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return min_y=val;
|
return min_y=val;
|
||||||
@ -462,7 +462,7 @@ double gGraphWindow::MaxY()
|
|||||||
val=(*l)->MaxY();
|
val=(*l)->MaxY();
|
||||||
first=false;
|
first=false;
|
||||||
} else {
|
} else {
|
||||||
if (val > (*l)->MinX()) val = (*l)->MaxY();
|
if ((*l)->MaxY()>val) val = (*l)->MaxY();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return max_y=val;
|
return max_y=val;
|
||||||
@ -481,7 +481,7 @@ double gGraphWindow::RealMinX()
|
|||||||
val=(*l)->RealMinX();
|
val=(*l)->RealMinX();
|
||||||
first=false;
|
first=false;
|
||||||
} else {
|
} else {
|
||||||
if (val > (*l)->MinX()) val = (*l)->RealMinX();
|
if ((*l)->RealMinX() < val) val = (*l)->RealMinX();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rmin_x=val;
|
return rmin_x=val;
|
||||||
@ -499,7 +499,7 @@ double gGraphWindow::RealMaxX()
|
|||||||
val=(*l)->RealMaxX();
|
val=(*l)->RealMaxX();
|
||||||
first=false;
|
first=false;
|
||||||
} else {
|
} else {
|
||||||
if (val < (*l)->MinX()) val = (*l)->RealMaxX();
|
if ((*l)->RealMaxX() > val) val = (*l)->RealMaxX();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rmax_x=val;
|
return rmax_x=val;
|
||||||
@ -517,7 +517,7 @@ double gGraphWindow::RealMinY()
|
|||||||
val=(*l)->RealMinY();
|
val=(*l)->RealMinY();
|
||||||
first=false;
|
first=false;
|
||||||
} else {
|
} else {
|
||||||
if (val > (*l)->MinX()) val = (*l)->RealMinY();
|
if ((*l)->RealMinY() < val) val = (*l)->RealMinY();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rmin_y=val;
|
return rmin_y=val;
|
||||||
@ -535,7 +535,7 @@ double gGraphWindow::RealMaxY()
|
|||||||
val=(*l)->RealMaxY();
|
val=(*l)->RealMaxY();
|
||||||
first=false;
|
first=false;
|
||||||
} else {
|
} else {
|
||||||
if (val > (*l)->MinX()) val = (*l)->RealMaxY();
|
if ((*l)->RealMaxY()>val) val = (*l)->RealMaxY();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rmax_y=val;
|
return rmax_y=val;
|
||||||
@ -1215,6 +1215,8 @@ void gLineChart::Plot(wxDC & dc, gGraphWindow & w)
|
|||||||
double ymult=height/yy;
|
double ymult=height/yy;
|
||||||
if (xx<=0)
|
if (xx<=0)
|
||||||
return;
|
return;
|
||||||
|
if (yy<=0)
|
||||||
|
return;
|
||||||
// assert(xx>=0);
|
// assert(xx>=0);
|
||||||
static wxPoint screen[4096]; // max screen size
|
static wxPoint screen[4096]; // max screen size
|
||||||
|
|
||||||
@ -1226,8 +1228,8 @@ void gLineChart::Plot(wxDC & dc, gGraphWindow & w)
|
|||||||
// dc.DrawLine(start_px,start_py,start_px+width,start_py);
|
// dc.DrawLine(start_px,start_py,start_px+width,start_py);
|
||||||
dc.DrawLine(start_px+width+1,start_py,start_px+width+1,start_py+height+1);
|
dc.DrawLine(start_px+width+1,start_py,start_px+width+1,start_py+height+1);
|
||||||
|
|
||||||
static wxPen pen2(wxDARK_GREY, 1, wxDOT);
|
wxPen pen2(wxDARK_GREY, 1, wxDOT);
|
||||||
static wxPen pen3(*wxGREEN, 2, wxSOLID);
|
wxPen pen3(*wxGREEN, 2, wxSOLID);
|
||||||
|
|
||||||
dc.SetPen( pen2 );
|
dc.SetPen( pen2 );
|
||||||
dc.DrawLine(start_px,start_py+height+10,start_px+width,start_py+height+10);
|
dc.DrawLine(start_px,start_py+height+10,start_px+width,start_py+height+10);
|
||||||
@ -1240,6 +1242,7 @@ void gLineChart::Plot(wxDC & dc, gGraphWindow & w)
|
|||||||
dc.DrawLine(start_px+py,start_py+height+8,start_px+py,start_py+height+12);
|
dc.DrawLine(start_px+py,start_py+height+8,start_px+py,start_py+height+12);
|
||||||
|
|
||||||
DrawYTicks(dc,w);
|
DrawYTicks(dc,w);
|
||||||
|
DrawXTicks(dc,w);
|
||||||
|
|
||||||
wxPen pen(*color[0], 1, wxSOLID);
|
wxPen pen(*color[0], 1, wxSOLID);
|
||||||
dc.SetPen(pen);
|
dc.SetPen(pen);
|
||||||
@ -1301,16 +1304,16 @@ void gLineChart::Plot(wxDC & dc, gGraphWindow & w)
|
|||||||
if (point[i].x < minx) done=true;
|
if (point[i].x < minx) done=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
px=(point[i].x - minx) * xmult;
|
px=(point[i].x - minx) * xmult;
|
||||||
py=height - ((point[i].y - miny) * ymult);
|
py=height - ((point[i].y - miny) * ymult);
|
||||||
/*if (px<0) {
|
|
||||||
// high school maths failure..
|
// Can't avoid this.. SetClippingRegion does not work without crashing.. need to find a workaround:(
|
||||||
|
if (px<0) {
|
||||||
px=0;
|
px=0;
|
||||||
}
|
}
|
||||||
if (px>width) {
|
if (px>width) {
|
||||||
px=width;
|
px=width;
|
||||||
} */
|
}
|
||||||
|
|
||||||
if (accel) {
|
if (accel) {
|
||||||
int z=round(px);
|
int z=round(px);
|
||||||
@ -1329,7 +1332,7 @@ void gLineChart::Plot(wxDC & dc, gGraphWindow & w)
|
|||||||
if (done) break;
|
if (done) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
dc.SetClippingRegion(start_px+1,start_py-1,width,height+1);
|
dc.SetClippingRegion(start_px+1,start_py-1,width,height+2);
|
||||||
if (accel) {
|
if (accel) {
|
||||||
// dc.DrawLine(1, 1, 1, height);
|
// dc.DrawLine(1, 1, 1, height);
|
||||||
dp=0;
|
dp=0;
|
||||||
@ -1352,7 +1355,6 @@ void gLineChart::Plot(wxDC & dc, gGraphWindow & w)
|
|||||||
}
|
}
|
||||||
dc.DestroyClippingRegion();
|
dc.DestroyClippingRegion();
|
||||||
//dc.SetClippingRegion(start_px-1,start_py+height,width+1,w.GetBottomMargin());
|
//dc.SetClippingRegion(start_px-1,start_py+height,width+1,w.GetBottomMargin());
|
||||||
DrawXTicks(dc,w);
|
|
||||||
//dc.DestroyClippingRegion();
|
//dc.DestroyClippingRegion();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1593,8 +1595,8 @@ void FlowData::Reload(Day *day)
|
|||||||
}
|
}
|
||||||
//wxRealPoint *rpl;
|
//wxRealPoint *rpl;
|
||||||
MachineCode code=CPAP_FlowRate;
|
MachineCode code=CPAP_FlowRate;
|
||||||
min_x=day->first(CPAP_Pressure).GetMJD();
|
min_x=day->first().GetMJD();
|
||||||
max_x=day->last(CPAP_Pressure).GetMJD();
|
max_x=day->last().GetMJD();
|
||||||
max_y=0;
|
max_y=0;
|
||||||
bool first=true;
|
bool first=true;
|
||||||
for (auto s=day->begin();s!=day->end(); s++) {
|
for (auto s=day->begin();s!=day->end(); s++) {
|
||||||
@ -1629,12 +1631,12 @@ void FlowData::Reload(Day *day)
|
|||||||
min_y=floor(min_y);
|
min_y=floor(min_y);
|
||||||
max_y=ceil(max_y);
|
max_y=ceil(max_y);
|
||||||
|
|
||||||
double t1=MAX(fabs(min_y),fabs(max_y));
|
//double t1=MAX(fabs(min_y),fabs(max_y));
|
||||||
|
|
||||||
max_y=t1;
|
//max_y=t1;
|
||||||
min_y=-t1;
|
//min_y=-t1;
|
||||||
min_y=-120;
|
min_y=-100;
|
||||||
max_y=120;
|
max_y=100;
|
||||||
|
|
||||||
real_min_x=min_x;
|
real_min_x=min_x;
|
||||||
real_min_y=min_y;
|
real_min_y=min_y;
|
||||||
@ -1697,16 +1699,21 @@ void PressureData::Reload(Day *day)
|
|||||||
vc++;
|
vc++;
|
||||||
|
|
||||||
}
|
}
|
||||||
if ((code==CPAP_Pressure) && (day->summary_max(CPAP_Mode)==MODE_CPAP)) {
|
/*if ((code==CPAP_Pressure) || (code==CPAP_EAP) || (code==CPAP_IAP)) {
|
||||||
min_y=4;
|
if (day->summary_max(CPAP_Mode)==MODE_CPAP) {
|
||||||
max_y=ceil(max_y+1);
|
min_y=4;
|
||||||
} else {
|
max_y=ceil(max_y+1);
|
||||||
if (min_y>day->summary_min(CPAP_PressureMin)) min_y=day->summary_min(CPAP_PressureMin);
|
} else {
|
||||||
if (max_y<day->summary_max(CPAP_PressureMax)) max_y=day->summary_min(CPAP_PressureMax);
|
if (min_y>day->summary_min(CPAP_PressureMin)) min_y=day->summary_min(CPAP_PressureMin);
|
||||||
|
if (max_y<day->summary_max(CPAP_PressureMax)) max_y=day->summary_min(CPAP_PressureMax);
|
||||||
//max_y=ceil(day->summary_max(CPAP_PressureMax));
|
//max_y=ceil(day->summary_max(CPAP_PressureMax));
|
||||||
|
min_y=floor(min_y);
|
||||||
|
max_y=ceil(max_y);
|
||||||
|
}
|
||||||
|
} else { */
|
||||||
min_y=floor(min_y);
|
min_y=floor(min_y);
|
||||||
max_y=ceil(max_y);
|
max_y=ceil(max_y);
|
||||||
}
|
//}
|
||||||
|
|
||||||
real_min_x=min_x;
|
real_min_x=min_x;
|
||||||
real_min_y=min_y;
|
real_min_y=min_y;
|
||||||
@ -1860,7 +1867,7 @@ void FlagData::Reload(Day *day)
|
|||||||
if (v2>max_x) max_x=v2; */
|
if (v2>max_x) max_x=v2; */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
min_y=0;
|
min_y=-value;
|
||||||
max_y=value;
|
max_y=value;
|
||||||
np[vc]=c;
|
np[vc]=c;
|
||||||
vc++;
|
vc++;
|
||||||
|
@ -138,21 +138,51 @@ Session *Machine::SessionExists(SessionID session)
|
|||||||
}
|
}
|
||||||
void Machine::AddSession(Session *s)
|
void Machine::AddSession(Session *s)
|
||||||
{
|
{
|
||||||
|
wxDateTime date=s->first();
|
||||||
|
date.ResetTime();
|
||||||
|
date-=wxTimeSpan::Day();
|
||||||
|
|
||||||
|
bool ok=false;
|
||||||
|
if (day.find(date)!=day.end()) {
|
||||||
|
wxTimeSpan span=s->first()-day[date]->last();
|
||||||
|
if (span<wxTimeSpan::Hours(4)) ok=true;
|
||||||
|
else {
|
||||||
|
|
||||||
|
wxDateTime t=s->first();
|
||||||
|
t.ResetTime();
|
||||||
|
wxTimeSpan j=s->first()-t;
|
||||||
|
if (j<wxTimeSpan::Hours(6)) {
|
||||||
|
ok=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
wxDateTime t=s->first();
|
||||||
|
t.ResetTime();
|
||||||
|
wxTimeSpan j=s->first()-t;
|
||||||
|
if (j<wxTimeSpan::Hours(6)) {
|
||||||
|
ok=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!ok) {
|
||||||
|
date+=wxTimeSpan::Day();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
sessionlist[s->session()]=s;
|
sessionlist[s->session()]=s;
|
||||||
|
|
||||||
wxDateTime s1=s->first();
|
/* wxDateTime s1=s->first();
|
||||||
wxDateTime s2=s->last();
|
wxDateTime s2=s->last();
|
||||||
if (s1==s2) return; // leave this session out of daylist.. it's dodgy. DELETE?
|
if (s1==s2) return; // leave this session out of daylist.. it's dodgy. DELETE?
|
||||||
|
|
||||||
|
|
||||||
wxDateTime date,d1=s1;
|
wxDateTime date,d1=s1;
|
||||||
d1.ResetTime();
|
|
||||||
date=d1;
|
date=d1;
|
||||||
d1.SetHour(16);
|
d1.SetHour(15);
|
||||||
|
|
||||||
if (s1<d1) {
|
if (s1<d1) {
|
||||||
date-=wxTimeSpan::Hours(24);
|
date-=wxTimeSpan::Hours(24);
|
||||||
}
|
} */
|
||||||
|
|
||||||
if (!firstsession) {
|
if (!firstsession) {
|
||||||
if (firstday>date) firstday=date;
|
if (firstday>date) firstday=date;
|
||||||
@ -168,7 +198,6 @@ void Machine::AddSession(Session *s)
|
|||||||
//wxLogMessage(wxT("Using Day ")+date.Format()+wxT(" to store ")+s1.Format()+wxT(" ")+s2.Format());
|
//wxLogMessage(wxT("Using Day ")+date.Format()+wxT(" to store ")+s1.Format()+wxT(" ")+s2.Format());
|
||||||
|
|
||||||
day[date]->AddSession(s);
|
day[date]->AddSession(s);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Machine::Load()
|
bool Machine::Load()
|
||||||
@ -679,10 +708,14 @@ double Session::weighted_avg_event_field(MachineCode mc,int field)
|
|||||||
void Session::AddEvent(Event * e)
|
void Session::AddEvent(Event * e)
|
||||||
{
|
{
|
||||||
events[e->code()].push_back(e);
|
events[e->code()].push_back(e);
|
||||||
|
// if (e->time()>s_last) s_last=e->time();
|
||||||
|
// wxLogMessage(e->time().Format(wxT("%Y-%m-%d %H:%M:%S"))+wxString::Format(wxT(" %04i %02i "),e->code(),e->fields()));
|
||||||
}
|
}
|
||||||
void Session::AddWaveform(Waveform *w)
|
void Session::AddWaveform(Waveform *w)
|
||||||
{
|
{
|
||||||
waveforms[w->code()].push_back(w);
|
waveforms[w->code()].push_back(w);
|
||||||
|
//wxLogMessage(w->start().Format(wxT("%Y-%m-%d %H:%M:%S"))+wxT(" ")+w->end().Format(wxT("%Y-%m-%d %H:%M:%S"))+wxString::Format(wxT(" %i %.1f"),w->samples(), w->duration()));
|
||||||
|
|
||||||
}
|
}
|
||||||
void Session::TrashEvents()
|
void Session::TrashEvents()
|
||||||
// Trash this sessions Events and release memory.
|
// Trash this sessions Events and release memory.
|
||||||
|
@ -44,7 +44,7 @@ wxInt16 {
|
|||||||
CPAP_PressureMin=0x80, CPAP_PressureMax, CPAP_RampTime, CPAP_RampStartingPressure, CPAP_Mode, CPAP_PressureReliefType,
|
CPAP_PressureMin=0x80, CPAP_PressureMax, CPAP_RampTime, CPAP_RampStartingPressure, CPAP_Mode, CPAP_PressureReliefType,
|
||||||
CPAP_PressureReliefSetting, CPAP_HumidifierSetting, CPAP_HumidifierStatus, CPAP_PressureMinAchieved,
|
CPAP_PressureReliefSetting, CPAP_HumidifierSetting, CPAP_HumidifierStatus, CPAP_PressureMinAchieved,
|
||||||
CPAP_PressureMaxAchieved, CPAP_PressurePercentValue, CPAP_PressurePercentName, CPAP_PressureAverage, CPAP_PressureMedian,
|
CPAP_PressureMaxAchieved, CPAP_PressurePercentValue, CPAP_PressurePercentName, CPAP_PressureAverage, CPAP_PressureMedian,
|
||||||
CPAP_LeakMedian,CPAP_LeakMinimum,CPAP_LeakMaximum,CPAP_LeakAverage,
|
CPAP_LeakMedian,CPAP_LeakMinimum,CPAP_LeakMaximum,CPAP_LeakAverage,CPAP_Duration,
|
||||||
|
|
||||||
// PRS1 Specific Codes
|
// PRS1 Specific Codes
|
||||||
PRS1_PressurePulse=0x1000, PRS1_VSnore2,
|
PRS1_PressurePulse=0x1000, PRS1_VSnore2,
|
||||||
|
@ -259,19 +259,20 @@ int PRS1Loader::OpenMachine(Machine *m,wxString path)
|
|||||||
delete sess;
|
delete sess;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const double ignore_thresh=300.0/3600.0;// Ignore useless sessions under 5 minute
|
wxLogMessage(sess->first().Format(wxT("%Y-%m-%d %H:%M:%S"))+wxT(" ")+sess->last().Format(wxT("%Y-%m-%d %H:%M:%S")));
|
||||||
if (sess->hours()<=ignore_thresh) {
|
|
||||||
delete sess;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
//sess->SetSessionID(sess->start().GetTicks());
|
//sess->SetSessionID(sess->start().GetTicks());
|
||||||
m->AddSession(sess);
|
|
||||||
if (!s->second[1].IsEmpty()) {
|
if (!s->second[1].IsEmpty()) {
|
||||||
if (!OpenEvents(sess,s->second[1])) {
|
if (!OpenEvents(sess,s->second[1])) {
|
||||||
wxLogWarning(wxT("PRS1Loader: Couldn't open event file ")+s->second[1]);
|
wxLogWarning(wxT("PRS1Loader: Couldn't open event file ")+s->second[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const double ignore_thresh=300.0/3600.0;// Ignore useless sessions under 5 minute
|
||||||
|
if (sess->hours()<=ignore_thresh) {
|
||||||
|
delete sess;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
m->AddSession(sess);
|
||||||
|
|
||||||
if (!s->second[2].IsEmpty()) {
|
if (!s->second[2].IsEmpty()) {
|
||||||
if (!OpenWaveforms(sess,s->second[2])) {
|
if (!OpenWaveforms(sess,s->second[2])) {
|
||||||
@ -279,16 +280,30 @@ int PRS1Loader::OpenMachine(Machine *m,wxString path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sess->summary.find(CPAP_Obstructive)!=sess->summary.end()) {
|
||||||
|
sess->summary[CPAP_Obstructive]=(long)sess->count_events(CPAP_Obstructive);
|
||||||
|
sess->summary[CPAP_Hypopnea]=(long)sess->count_events(CPAP_Hypopnea);
|
||||||
|
sess->summary[CPAP_ClearAirway]=(long)sess->count_events(CPAP_ClearAirway);
|
||||||
|
sess->summary[CPAP_RERA]=(long)sess->count_events(CPAP_RERA);
|
||||||
|
sess->summary[CPAP_FlowLimit]=(long)sess->count_events(CPAP_FlowLimit);
|
||||||
|
}
|
||||||
|
|
||||||
sess->summary[CPAP_CSR]=sess->sum_event_field(CPAP_CSR,0);
|
sess->summary[CPAP_CSR]=sess->sum_event_field(CPAP_CSR,0);
|
||||||
sess->summary[CPAP_VSnore]=(long)sess->count_events(CPAP_VSnore);
|
sess->summary[CPAP_VSnore]=(long)sess->count_events(CPAP_VSnore);
|
||||||
sess->summary[PRS1_VSnore2]=sess->sum_event_field(PRS1_VSnore2,0);
|
sess->summary[PRS1_VSnore2]=sess->sum_event_field(PRS1_VSnore2,0);
|
||||||
|
|
||||||
|
|
||||||
sess->summary[CPAP_PressureMedian]=sess->avg_event_field(CPAP_Pressure,0);
|
if (sess->count_events(CPAP_IAP)>0) {
|
||||||
sess->summary[CPAP_PressureAverage]=sess->weighted_avg_event_field(CPAP_Pressure,0);
|
sess->summary[CPAP_PressureMedian]=(sess->avg_event_field(CPAP_EAP,0)+sess->avg_event_field(CPAP_IAP,0))/2.0;
|
||||||
sess->summary[CPAP_PressureMinAchieved]=sess->min_event_field(CPAP_Pressure,0);
|
sess->summary[CPAP_PressureAverage]=(sess->weighted_avg_event_field(CPAP_IAP,0)+sess->weighted_avg_event_field(CPAP_EAP,0))/2.0;
|
||||||
sess->summary[CPAP_PressureMaxAchieved]=sess->max_event_field(CPAP_Pressure,0);
|
sess->summary[CPAP_PressureMinAchieved]=sess->min_event_field(CPAP_IAP,0);
|
||||||
|
sess->summary[CPAP_PressureMaxAchieved]=sess->max_event_field(CPAP_EAP,0);
|
||||||
|
} else {
|
||||||
|
sess->summary[CPAP_PressureMedian]=sess->avg_event_field(CPAP_Pressure,0);
|
||||||
|
sess->summary[CPAP_PressureAverage]=sess->weighted_avg_event_field(CPAP_Pressure,0);
|
||||||
|
sess->summary[CPAP_PressureMinAchieved]=sess->min_event_field(CPAP_Pressure,0);
|
||||||
|
sess->summary[CPAP_PressureMaxAchieved]=sess->max_event_field(CPAP_Pressure,0);
|
||||||
|
}
|
||||||
|
|
||||||
sess->summary[CPAP_LeakMinimum]=sess->min_event_field(CPAP_Leak,0);
|
sess->summary[CPAP_LeakMinimum]=sess->min_event_field(CPAP_Leak,0);
|
||||||
sess->summary[CPAP_LeakMaximum]=sess->max_event_field(CPAP_Leak,0); // should be merged..
|
sess->summary[CPAP_LeakMaximum]=sess->max_event_field(CPAP_Leak,0); // should be merged..
|
||||||
@ -346,6 +361,7 @@ bool PRS1Loader::OpenSummary(Session *session,wxString filename)
|
|||||||
|
|
||||||
if (!date.IsValid()) return false;
|
if (!date.IsValid()) return false;
|
||||||
|
|
||||||
|
memset(m_buffer,0,size);
|
||||||
unsigned char * buffer=m_buffer;
|
unsigned char * buffer=m_buffer;
|
||||||
br=f.Read(buffer,size);
|
br=f.Read(buffer,size);
|
||||||
if (br<size) {
|
if (br<size) {
|
||||||
@ -353,6 +369,7 @@ bool PRS1Loader::OpenSummary(Session *session,wxString filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
session->set_first(date);
|
session->set_first(date);
|
||||||
|
session->set_last(date);
|
||||||
double max;
|
double max;
|
||||||
session->summary[CPAP_PressureMin]=(double)buffer[0x03]/10.0;
|
session->summary[CPAP_PressureMin]=(double)buffer[0x03]/10.0;
|
||||||
session->summary[CPAP_PressureMax]=max=(double)buffer[0x04]/10.0;
|
session->summary[CPAP_PressureMax]=max=(double)buffer[0x04]/10.0;
|
||||||
@ -383,6 +400,8 @@ bool PRS1Loader::OpenSummary(Session *session,wxString filename)
|
|||||||
session->summary[PRS1_ShowAHI]=(buffer[0x0c]&0x04)==0x04;
|
session->summary[PRS1_ShowAHI]=(buffer[0x0c]&0x04)==0x04;
|
||||||
|
|
||||||
int duration=buffer[0x14] | (buffer[0x15] << 8);
|
int duration=buffer[0x14] | (buffer[0x15] << 8);
|
||||||
|
session->summary[CPAP_Duration]=(long)duration;
|
||||||
|
wxLogMessage(wxString::Format(wxT("%i"),duration));
|
||||||
float hours=float(duration)/3600.0;
|
float hours=float(duration)/3600.0;
|
||||||
session->set_hours(hours);
|
session->set_hours(hours);
|
||||||
|
|
||||||
@ -397,13 +416,14 @@ bool PRS1Loader::OpenSummary(Session *session,wxString filename)
|
|||||||
if (max==0) {
|
if (max==0) {
|
||||||
session->summary[CPAP_PressureAverage]=session->summary[CPAP_PressureMin];
|
session->summary[CPAP_PressureAverage]=session->summary[CPAP_PressureMin];
|
||||||
}
|
}
|
||||||
|
if (size==0x4d) {
|
||||||
|
|
||||||
session->summary[CPAP_Obstructive]=(long)buffer[0x1C] | (buffer[0x1D] << 8);
|
session->summary[CPAP_Obstructive]=(long)buffer[0x1C] | (buffer[0x1D] << 8);
|
||||||
session->summary[CPAP_ClearAirway]=(long)buffer[0x20] | (buffer[0x21] << 8);
|
session->summary[CPAP_ClearAirway]=(long)buffer[0x20] | (buffer[0x21] << 8);
|
||||||
session->summary[CPAP_Hypopnea]=(long)buffer[0x2A] | (buffer[0x2B] << 8);
|
session->summary[CPAP_Hypopnea]=(long)buffer[0x2A] | (buffer[0x2B] << 8);
|
||||||
session->summary[CPAP_RERA]=(long)buffer[0x2E] | (buffer[0x2F] << 8);
|
session->summary[CPAP_RERA]=(long)buffer[0x2E] | (buffer[0x2F] << 8);
|
||||||
session->summary[CPAP_FlowLimit]=(long)buffer[0x30] | (buffer[0x31] << 8);
|
session->summary[CPAP_FlowLimit]=(long)buffer[0x30] | (buffer[0x31] << 8);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,8 +486,10 @@ bool PRS1Loader::Parse002(Session *session,unsigned char *buffer,int size,time_t
|
|||||||
session->AddEvent(new Event(tt,PRS1_VSnore2, {data1}));
|
session->AddEvent(new Event(tt,PRS1_VSnore2, {data1}));
|
||||||
}
|
}
|
||||||
} else if (code==0x03) {
|
} else if (code==0x03) {
|
||||||
session->AddEvent(new Event(t,CPAP_EAP, {data0,data1}));
|
data0/=10.0;
|
||||||
session->AddEvent(new Event(t,CPAP_IAP, {data1}));
|
data1/=10.0;
|
||||||
|
session->AddEvent(new Event(t,CPAP_EAP, {data1,data0}));
|
||||||
|
session->AddEvent(new Event(t,CPAP_IAP, {data0}));
|
||||||
} else {
|
} else {
|
||||||
session->AddEvent(new Event(t,cpapcode, {data0,data1}));
|
session->AddEvent(new Event(t,cpapcode, {data0,data1}));
|
||||||
}
|
}
|
||||||
@ -655,6 +677,7 @@ bool PRS1Loader::OpenWaveforms(Session *session,wxString filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Waveform *w=new Waveform(start,CPAP_FlowRate,data,samples,duration,min,max);
|
Waveform *w=new Waveform(start,CPAP_FlowRate,data,samples,duration,min,max);
|
||||||
|
//wxLogMessage(wxString::Format(wxT("%i %i %i %i %i"),start,samples,duration,min,max));
|
||||||
session->AddWaveform(w);
|
session->AddWaveform(w);
|
||||||
//wxLogMessage(wxT("Done PRS1 Waveforms ")+filename);
|
//wxLogMessage(wxT("Done PRS1 Waveforms ")+filename);
|
||||||
return true;
|
return true;
|
||||||
|
14
version.h
14
version.h
@ -4,7 +4,7 @@
|
|||||||
namespace AutoVersion{
|
namespace AutoVersion{
|
||||||
|
|
||||||
//Date Version Types
|
//Date Version Types
|
||||||
static const char DATE[] = "28";
|
static const char DATE[] = "29";
|
||||||
static const char MONTH[] = "05";
|
static const char MONTH[] = "05";
|
||||||
static const char YEAR[] = "2011";
|
static const char YEAR[] = "2011";
|
||||||
static const char UBUNTU_VERSION_STYLE[] = "11.05";
|
static const char UBUNTU_VERSION_STYLE[] = "11.05";
|
||||||
@ -16,14 +16,14 @@ namespace AutoVersion{
|
|||||||
//Standard Version Type
|
//Standard Version Type
|
||||||
static const long MAJOR = 0;
|
static const long MAJOR = 0;
|
||||||
static const long MINOR = 7;
|
static const long MINOR = 7;
|
||||||
static const long BUILD = 1639;
|
static const long BUILD = 1721;
|
||||||
static const long REVISION = 3455;
|
static const long REVISION = 3923;
|
||||||
|
|
||||||
//Miscellaneous Version Types
|
//Miscellaneous Version Types
|
||||||
static const long BUILDS_COUNT = 5668;
|
static const long BUILDS_COUNT = 5906;
|
||||||
#define RC_FILEVERSION 0,7,1639,3455
|
#define RC_FILEVERSION 0,7,1721,3923
|
||||||
#define RC_FILEVERSION_STRING "0, 7, 1639, 3455\0"
|
#define RC_FILEVERSION_STRING "0, 7, 1721, 3923\0"
|
||||||
static const char FULLVERSION_STRING[] = "0.7.1639.3455";
|
static const char FULLVERSION_STRING[] = "0.7.1721.3923";
|
||||||
|
|
||||||
//These values are to keep track of your versioning state, don't modify them.
|
//These values are to keep track of your versioning state, don't modify them.
|
||||||
static const long BUILD_HISTORY = 62;
|
static const long BUILD_HISTORY = 62;
|
||||||
|
Loading…
Reference in New Issue
Block a user