mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 20:20:44 +00:00
Further zMaskProfile cleanup, no change in functionality.
This commit is contained in:
parent
5693dcf458
commit
b2f86a720c
@ -1180,8 +1180,8 @@ struct TimeValue {
|
|||||||
|
|
||||||
struct zMaskProfile {
|
struct zMaskProfile {
|
||||||
public:
|
public:
|
||||||
zMaskProfile();
|
zMaskProfile() {};
|
||||||
~zMaskProfile();
|
~zMaskProfile() {};
|
||||||
|
|
||||||
void scanPressure(Session *session);
|
void scanPressure(Session *session);
|
||||||
|
|
||||||
@ -1199,13 +1199,6 @@ bool operator<(const TimeValue &p1, const TimeValue &p2)
|
|||||||
return p1.time < p2.time;
|
return p1.time < p2.time;
|
||||||
}
|
}
|
||||||
|
|
||||||
zMaskProfile::zMaskProfile()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
zMaskProfile::~zMaskProfile()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void zMaskProfile::scanPressureList(Session *session, ChannelID code)
|
void zMaskProfile::scanPressureList(Session *session, ChannelID code)
|
||||||
{
|
{
|
||||||
auto it = session->eventlist.find(code);
|
auto it = session->eventlist.find(code);
|
||||||
@ -1247,13 +1240,6 @@ void zMaskProfile::scanPressure(Session *session)
|
|||||||
// Returns what the nominal leak SHOULD be at the given pressure
|
// Returns what the nominal leak SHOULD be at the given pressure
|
||||||
EventDataType zMaskProfile::calcLeak(EventStoreType pressure)
|
EventDataType zMaskProfile::calcLeak(EventStoreType pressure)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Average mask leak minimum at pressure 4 = 20.167
|
|
||||||
// Average mask slope = 1.76
|
|
||||||
// Min/max Slope = 1.313 - 2.188
|
|
||||||
// Min/max leak at pressure 4 = 18 - 22
|
|
||||||
// Min/max leak at pressure 20 = 42 - 54
|
|
||||||
|
|
||||||
float leak; // = 0.0;
|
float leak; // = 0.0;
|
||||||
|
|
||||||
float lpm4 = p_profile->cpap->custom4cmH2OLeaks();
|
float lpm4 = p_profile->cpap->custom4cmH2OLeaks();
|
||||||
@ -1287,6 +1273,7 @@ int calcLeaks(Session *session)
|
|||||||
|
|
||||||
maskProfile->scanPressure(session);
|
maskProfile->scanPressure(session);
|
||||||
|
|
||||||
|
// TODO: a single leak eventlist incorrectly handles discontinuous data
|
||||||
EventList *leak = session->AddEventList(CPAP_Leak, EVL_Event, 1);
|
EventList *leak = session->AddEventList(CPAP_Leak, EVL_Event, 1);
|
||||||
|
|
||||||
auto & EVL = session->eventlist[CPAP_LeakTotal];
|
auto & EVL = session->eventlist[CPAP_LeakTotal];
|
||||||
|
@ -558,6 +558,9 @@ class CPAPSettings : public PrefSettings
|
|||||||
initPref(STR_CS_AutoImport, false);
|
initPref(STR_CS_AutoImport, false);
|
||||||
initPref(STR_CS_BrickWarning, true);
|
initPref(STR_CS_BrickWarning, true);
|
||||||
|
|
||||||
|
// From old zMaskProfile::calcLeak comments:
|
||||||
|
// Average mask leak minimum at pressure 4 = 20.167
|
||||||
|
// Average mask slope = 1.76
|
||||||
m_calcUnintentionalLeaks = initPref(STR_CS_CalculateUnintentionalLeaks, true).toBool();
|
m_calcUnintentionalLeaks = initPref(STR_CS_CalculateUnintentionalLeaks, true).toBool();
|
||||||
m_4cmH2OLeaks = initPref(STR_CS_4cmH2OLeaks, 20.167).toDouble();
|
m_4cmH2OLeaks = initPref(STR_CS_4cmH2OLeaks, 20.167).toDouble();
|
||||||
m_20cmH2OLeaks = initPref(STR_CS_20cmH2OLeaks, 48.333).toDouble();
|
m_20cmH2OLeaks = initPref(STR_CS_20cmH2OLeaks, 48.333).toDouble();
|
||||||
|
Loading…
Reference in New Issue
Block a user