Merge branch 'master' into translations

This commit is contained in:
ArieKlerk 2020-03-26 19:41:44 +01:00
commit 6b5b3fc212
12 changed files with 591 additions and 265 deletions

View File

@ -805,6 +805,8 @@ qint64 Day::total_time(MachineType type)
} }
ChannelID Day::getPressureChannelID() { ChannelID Day::getPressureChannelID() {
// TODO: This is an awful hack that depends on the enum ordering of the generic CPAP_Mode channel.
// See the comment in getCPAPModeStr().
// Determined the preferred pressure channel (CPAP_IPAP or CPAP_Pressure) // Determined the preferred pressure channel (CPAP_IPAP or CPAP_Pressure)
CPAPMode cpapmode = (CPAPMode)(int)settings_max(CPAP_Mode); CPAPMode cpapmode = (CPAPMode)(int)settings_max(CPAP_Mode);
ChannelID preferredID = CPAP_Pressure; ChannelID preferredID = CPAP_Pressure;
@ -1401,15 +1403,23 @@ void Day::removeMachine(Machine * mach)
int Day::getCPAPMode() int Day::getCPAPMode()
{ {
// NOTE: This needs to return the generic mode, unlike getCPAPModeStr().
// This function is used only to determine whether to use advanced graphs,
// which refer to the generic mode.
/*
Machine * mach = machine(MT_CPAP); Machine * mach = machine(MT_CPAP);
if (!mach) return 0; if (!mach) return 0;
CPAPLoader * loader = qobject_cast<CPAPLoader *>(mach->loader()); CPAPLoader * loader = qobject_cast<CPAPLoader *>(mach->loader());
ChannelID modechan = loader->CPAPModeChannel(); ChannelID modechan = loader->CPAPModeChannel();
*/
ChannelID modechan = CPAP_Mode;
// schema::Channel & chan = schema::channel[modechan]; // schema::Channel & chan = schema::channel[modechan];
// TODO: This is an awful hack that depends on the enum ordering of the machine-specific CPAP mode.
// See the comment in getCPAPModeStr().
int mode = (CPAPMode)(int)qRound(settings_wavg(modechan)); int mode = (CPAPMode)(int)qRound(settings_wavg(modechan));
return mode; return mode;
@ -1426,6 +1436,10 @@ QString Day::getCPAPModeStr()
schema::Channel & chan = schema::channel[modechan]; schema::Channel & chan = schema::channel[modechan];
// TODO: This is an awful hack that depends on the enum ordering of the machine-specific CPAP mode.
// Instead, we should calculate how long each mode was in operation and
// determine the one that was running the longest, along with the settings
// while that mode was in operation.
int mode = (CPAPMode)(int)qRound(settings_wavg(modechan)); int mode = (CPAPMode)(int)qRound(settings_wavg(modechan));
return chan.option(mode); return chan.option(mode);
@ -1463,6 +1477,8 @@ QString Day::getPressureRelief()
ChannelID pr_mode_chan = loader->PresReliefMode(); ChannelID pr_mode_chan = loader->PresReliefMode();
if ((pr_mode_chan != NoChannel) && settingExists(pr_mode_chan)) { if ((pr_mode_chan != NoChannel) && settingExists(pr_mode_chan)) {
// TODO: This is an awful hack that depends on the enum ordering of the pressure relief mode.
// See the comment in getCPAPModeStr().
int pr_mode = qRound(settings_wavg(pr_mode_chan)); int pr_mode = qRound(settings_wavg(pr_mode_chan));
pr_str = QObject::tr("%1%2").arg(loader->PresReliefLabel()).arg(schema::channel[pr_mode_chan].option(pr_mode)); pr_str = QObject::tr("%1%2").arg(loader->PresReliefLabel()).arg(schema::channel[pr_mode_chan].option(pr_mode));
@ -1488,6 +1504,8 @@ QString Day::getPressureSettings()
return QString(); return QString();
} }
// TODO: This is an awful hack that depends on the enum ordering of the generic CPAP_Mode channel.
// See the comment in getCPAPModeStr().
CPAPMode mode = (CPAPMode)(int)settings_max(CPAP_Mode); CPAPMode mode = (CPAPMode)(int)settings_max(CPAP_Mode);
QString units = schema::channel[CPAP_Pressure].units(); QString units = schema::channel[CPAP_Pressure].units();
@ -1516,9 +1534,10 @@ QString Day::getPressureSettings()
arg(validPressure(settings_min(CPAP_PSMax))). arg(validPressure(settings_min(CPAP_PSMax))).
arg(units); arg(units);
} else if (mode == MODE_AVAPS) { } else if (mode == MODE_AVAPS) {
return QObject::tr("EPAP %1 IPAP %2 (%3)"). return QObject::tr("EPAP %1 IPAP %2-%3 (%4)").
arg(validPressure(settings_min(CPAP_EPAP))). arg(validPressure(settings_min(CPAP_EPAP))).
arg(validPressure(settings_max(CPAP_IPAP))). arg(validPressure(settings_max(CPAP_IPAPLo))).
arg(validPressure(settings_max(CPAP_IPAPHi))).
arg(units); arg(units);
} }

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@
//******************************************************************************************** //********************************************************************************************
// Please INCREMENT the following value when making changes to this loaders implementation // Please INCREMENT the following value when making changes to this loaders implementation
// BEFORE making a release // BEFORE making a release
const int prs1_data_version = 17; const int prs1_data_version = 18;
// //
//******************************************************************************************** //********************************************************************************************
#if 0 // Apparently unused #if 0 // Apparently unused
@ -420,16 +420,18 @@ class PRS1Loader : public CPAPLoader
} }
virtual QString PresReliefLabel() { return QObject::tr(""); } virtual QString PresReliefLabel();
//! \brief Returns the PRS1 specific code for Pressure Relief Mode //! \brief Returns the PRS1 specific code for Pressure Relief Mode
virtual ChannelID PresReliefMode() { return PRS1_FlexMode; } virtual ChannelID PresReliefMode();
//! \brief Returns the PRS1 specific code for Pressure Relief Setting //! \brief Returns the PRS1 specific code for Pressure Relief Setting
virtual ChannelID PresReliefLevel() { return PRS1_FlexLevel; } virtual ChannelID PresReliefLevel();
//! \brief Returns the PRS1 specific code for PAP mode
virtual ChannelID CPAPModeChannel();
//! \brief Returns the PRS1 specific code for Humidifier Connected //! \brief Returns the PRS1 specific code for Humidifier Connected
virtual ChannelID HumidifierConnected() { return PRS1_HumidStatus; } virtual ChannelID HumidifierConnected();
//! \brief Returns the PRS1 specific code for Humidifier Level //! \brief Returns the PRS1 specific code for Humidifier Level
virtual ChannelID HumidifierLevel() { return PRS1_HumidLevel; } virtual ChannelID HumidifierLevel();
//! \brief Called at application init, to set up any custom PRS1 Channels //! \brief Called at application init, to set up any custom PRS1 Channels
void initChannels(); void initChannels();

View File

@ -21,7 +21,7 @@ ChannelID CPAP_IPAP, CPAP_IPAPLo, CPAP_IPAPHi, CPAP_EPAP, CPAP_EPAPLo, CPAP_EPAP
CPAP_MaskPressureHi, CPAP_MaskPressureHi,
CPAP_RespEvent, CPAP_Snore, CPAP_MinuteVent, CPAP_RespRate, CPAP_TidalVolume, CPAP_PTB, CPAP_Leak, CPAP_RespEvent, CPAP_Snore, CPAP_MinuteVent, CPAP_RespRate, CPAP_TidalVolume, CPAP_PTB, CPAP_Leak,
CPAP_LeakMedian, CPAP_LeakTotal, CPAP_MaxLeak, CPAP_FLG, CPAP_IE, CPAP_Te, CPAP_Ti, CPAP_TgMV, CPAP_LeakMedian, CPAP_LeakTotal, CPAP_MaxLeak, CPAP_FLG, CPAP_IE, CPAP_Te, CPAP_Ti, CPAP_TgMV,
CPAP_UserFlag1, CPAP_UserFlag2, CPAP_UserFlag3, CPAP_BrokenSummary, CPAP_BrokenWaveform, CPAP_RDI, CPAP_UserFlag1, CPAP_UserFlag2, CPAP_UserFlag3, /*CPAP_BrokenSummary, CPAP_BrokenWaveform,*/ CPAP_RDI,
CPAP_PresReliefMode, CPAP_PresReliefLevel, CPAP_PSMin, CPAP_PSMax, CPAP_Test1, CPAP_PresReliefMode, CPAP_PresReliefLevel, CPAP_PSMin, CPAP_PSMax, CPAP_Test1,
CPAP_Test2, CPAP_HumidSetting, CPAP_Test2, CPAP_HumidSetting,
CPAP_PressureSet, CPAP_IPAPSet, CPAP_EPAPSet; CPAP_PressureSet, CPAP_IPAPSet, CPAP_EPAPSet;
@ -30,10 +30,9 @@ ChannelID CPAP_IPAP, CPAP_IPAPLo, CPAP_IPAPHi, CPAP_EPAP, CPAP_EPAPLo, CPAP_EPAP
ChannelID RMS9_E01, RMS9_E02, RMS9_SetPressure, RMS9_MaskOnTime; ChannelID RMS9_E01, RMS9_E02, RMS9_SetPressure, RMS9_MaskOnTime;
ChannelID INTELLIPAP_Unknown1, INTELLIPAP_Unknown2; ChannelID INTELLIPAP_Unknown1, INTELLIPAP_Unknown2;
ChannelID PRS1_0E, CPAP_LargeLeak, ChannelID CPAP_LargeLeak,
PRS1_BND, PRS1_FlexMode, PRS1_FlexLevel, PRS1_HumidStatus, PRS1_HumidLevel, PRS1_SysLock, PRS1_BND, PRS1_FlexMode, PRS1_FlexLevel, PRS1_HumidStatus, PRS1_HumidLevel, PRS1_MaskResistLock,
PRS1_SysOneResistStat, PRS1_MaskResistSet, PRS1_HoseDiam, PRS1_AutoOn, PRS1_AutoOff, PRS1_MaskAlert, PRS1_ShowAHI;
PRS1_SysOneResistSet, PRS1_HoseDiam, PRS1_AutoOn, PRS1_AutoOff, PRS1_MaskAlert, PRS1_ShowAHI;
ChannelID OXI_Pulse, OXI_SPO2, OXI_Perf, OXI_PulseChange, OXI_SPO2Drop, OXI_Plethy; ChannelID OXI_Pulse, OXI_SPO2, OXI_Perf, OXI_PulseChange, OXI_SPO2Drop, OXI_Plethy;

View File

@ -152,15 +152,14 @@ extern ChannelID CPAP_IPAP, CPAP_IPAPLo, CPAP_IPAPHi, CPAP_EPAP, CPAP_EPAPLo, CP
CPAP_MaskPressureHi, CPAP_MaskPressureHi,
CPAP_RespEvent, CPAP_Snore, CPAP_MinuteVent, CPAP_RespRate, CPAP_TidalVolume, CPAP_PTB, CPAP_Leak, CPAP_RespEvent, CPAP_Snore, CPAP_MinuteVent, CPAP_RespRate, CPAP_TidalVolume, CPAP_PTB, CPAP_Leak,
CPAP_LeakMedian, CPAP_LeakTotal, CPAP_MaxLeak, CPAP_FLG, CPAP_IE, CPAP_Te, CPAP_Ti, CPAP_TgMV, CPAP_LeakMedian, CPAP_LeakTotal, CPAP_MaxLeak, CPAP_FLG, CPAP_IE, CPAP_Te, CPAP_Ti, CPAP_TgMV,
CPAP_UserFlag1, CPAP_UserFlag2, CPAP_UserFlag3, CPAP_BrokenSummary, CPAP_BrokenWaveform, CPAP_RDI, CPAP_UserFlag1, CPAP_UserFlag2, CPAP_UserFlag3, /*CPAP_BrokenSummary, CPAP_BrokenWaveform,*/ CPAP_RDI,
CPAP_PresReliefMode, CPAP_PresReliefLevel, CPAP_Test1, CPAP_Test2, CPAP_PresReliefMode, CPAP_PresReliefLevel, CPAP_Test1, CPAP_Test2,
CPAP_PressureSet, CPAP_IPAPSet, CPAP_EPAPSet; CPAP_PressureSet, CPAP_IPAPSet, CPAP_EPAPSet;
extern ChannelID RMS9_E01, RMS9_E02, RMS9_SetPressure, RMS9_MaskOnTime; extern ChannelID RMS9_E01, RMS9_E02, RMS9_SetPressure, RMS9_MaskOnTime;
extern ChannelID PRS1_0E, CPAP_LargeLeak, PRS1_BND, extern ChannelID CPAP_LargeLeak, PRS1_BND,
PRS1_FlexMode, PRS1_FlexLevel, PRS1_HumidStatus, PRS1_HumidLevel, CPAP_HumidSetting, PRS1_SysLock, PRS1_FlexMode, PRS1_FlexLevel, PRS1_HumidStatus, PRS1_HumidLevel, CPAP_HumidSetting, PRS1_MaskResistLock,
PRS1_SysOneResistStat, PRS1_MaskResistSet, PRS1_HoseDiam, PRS1_AutoOn, PRS1_AutoOff, PRS1_MaskAlert, PRS1_ShowAHI;
PRS1_SysOneResistSet, PRS1_HoseDiam, PRS1_AutoOn, PRS1_AutoOff, PRS1_MaskAlert, PRS1_ShowAHI;
extern ChannelID INTELLIPAP_Unknown1, INTELLIPAP_Unknown2; extern ChannelID INTELLIPAP_Unknown1, INTELLIPAP_Unknown2;

View File

@ -541,7 +541,7 @@ void Profile::DataFormatError(Machine *m)
msg = msg + QObject::tr("This means you will need to import this machine data again afterwards from your own backups or data card.") + "<br/><br/>"; msg = msg + QObject::tr("This means you will need to import this machine data again afterwards from your own backups or data card.") + "<br/><br/>";
} }
msg += "<font size=+1>"+QObject::tr("Important:")+"</font> "+QObject::tr("Once you upgrade, you <font size=+1>can not</font> use this profile with the previous version anymore.")+"<br/><br/>"+ msg += "<font size=+1>"+QObject::tr("Important:")+"</font> "+QObject::tr("Once you upgrade, you <font size=+1>cannot</font> use this profile with the previous version anymore.")+"<br/><br/>"+
QObject::tr("If you are concerned, click No to exit, and backup your profile manually, before starting OSCAR again.")+ "<br/><br/>"; QObject::tr("If you are concerned, click No to exit, and backup your profile manually, before starting OSCAR again.")+ "<br/><br/>";
msg = msg + "<font size=+1>"+QObject::tr("Are you ready to upgrade, so you can run the new version of OSCAR?")+"</font>"; msg = msg + "<font size=+1>"+QObject::tr("Are you ready to upgrade, so you can run the new version of OSCAR?")+"</font>";

View File

@ -332,8 +332,10 @@ void init()
schema::channel.add(GRP_SLEEP, ch = new Channel(ZEO_ZQ = 0x2009, DATA, MT_SLEEPSTAGE, SESSION, "ZeoZQ", QObject::tr("Zeo ZQ"), QObject::tr("Zeo sleep quality measurement"), QObject::tr("ZEO ZQ"), QString(), INTEGER, Qt::black)); schema::channel.add(GRP_SLEEP, ch = new Channel(ZEO_ZQ = 0x2009, DATA, MT_SLEEPSTAGE, SESSION, "ZeoZQ", QObject::tr("Zeo ZQ"), QObject::tr("Zeo sleep quality measurement"), QObject::tr("ZEO ZQ"), QString(), INTEGER, Qt::black));
NoChannel = 0; NoChannel = 0;
/*
CPAP_BrokenSummary = schema::channel["BrokenSummary"].id(); CPAP_BrokenSummary = schema::channel["BrokenSummary"].id();
CPAP_BrokenWaveform = schema::channel["BrokenWaveform"].id(); CPAP_BrokenWaveform = schema::channel["BrokenWaveform"].id();
*/
// <channel id="0x111e" class="data" name="TestChan1" details="Debugging Channel #1" label="Test #1" unit="" color="pink"/> // <channel id="0x111e" class="data" name="TestChan1" details="Debugging Channel #1" label="Test #1" unit="" color="pink"/>
// <channel id="0x111f" class="data" name="TestChan2" details="Debugging Channel #2" label="Test #2" unit="" color="blue"/> // <channel id="0x111f" class="data" name="TestChan2" details="Debugging Channel #2" label="Test #2" unit="" color="blue"/>

View File

@ -983,7 +983,7 @@ QString Daily::getSessionInformation(Day * day)
// Machine * cpap = day->machine(MT_CPAP); // Machine * cpap = day->machine(MT_CPAP);
QDateTime fd,ld; QDateTime fd,ld;
bool corrupted_waveform=false; //bool corrupted_waveform=false;
QString type; QString type;
@ -1023,9 +1023,11 @@ QString Daily::getSessionInformation(Day * day)
QList<Session *> sesslist = day->getSessions(mi.key(), true); QList<Session *> sesslist = day->getSessions(mi.key(), true);
for (QList<Session *>::iterator s=sesslist.begin(); s != sesslist.end(); ++s) { for (QList<Session *>::iterator s=sesslist.begin(); s != sesslist.end(); ++s) {
/*
if (((*s)->type() == MT_CPAP) && if (((*s)->type() == MT_CPAP) &&
((*s)->settings.find(CPAP_BrokenWaveform) != (*s)->settings.end())) ((*s)->settings.find(CPAP_BrokenWaveform) != (*s)->settings.end()))
corrupted_waveform=true; corrupted_waveform=true;
*/
fd=QDateTime::fromTime_t((*s)->first()/1000L); fd=QDateTime::fromTime_t((*s)->first()/1000L);
ld=QDateTime::fromTime_t((*s)->last()/1000L); ld=QDateTime::fromTime_t((*s)->last()/1000L);
@ -1066,9 +1068,11 @@ QString Daily::getSessionInformation(Day * day)
} }
} }
/*
if (corrupted_waveform) { if (corrupted_waveform) {
html+=QString("<tr><td colspan=5 align=center><i>%1</i></td></tr>").arg(tr("One or more waveform record(s) for this session had faulty source data. Some waveform overlay points may not match up correctly.")); html+=QString("<tr><td colspan=5 align=center><i>%1</i></td></tr>").arg(tr("One or more waveform record(s) for this session had faulty source data. Some waveform overlay points may not match up correctly."));
} }
*/
html+="</table>"; html+="</table>";
return html; return html;
} }
@ -1084,9 +1088,11 @@ QString Daily::getMachineSettings(Day * day) {
if (day->noSettings(cpap)) { if (day->noSettings(cpap)) {
html+="<tr><td colspan=5 align=center><i>"+tr("<b>Please Note:</b> All settings shown below are based on assumptions that nothing has changed since previous days.")+"</i></td></tr>\n"; html+="<tr><td colspan=5 align=center><i>"+tr("<b>Please Note:</b> All settings shown below are based on assumptions that nothing has changed since previous days.")+"</i></td></tr>\n";
/*
} else if ((day->settingExists(CPAP_BrokenSummary))) { } else if ((day->settingExists(CPAP_BrokenSummary))) {
html+="<tr><td colspan=5 align=center><i>"+tr("Machine Settings Unavailable")+"</i></td></tr></table><hr/>\n"; html+="<tr><td colspan=5 align=center><i>"+tr("Machine Settings Unavailable")+"</i></td></tr></table><hr/>\n";
return html; return html;
*/
} }
QMap<QString, QString> other; QMap<QString, QString> other;
@ -1122,7 +1128,11 @@ QString Daily::getMachineSettings(Day * day) {
QString data; QString data;
if (chan.datatype() == schema::LOOKUP) { if (chan.datatype() == schema::LOOKUP) {
data = chan.option(it.value().toInt()); int value = it.value().toInt();
data = chan.option(value);
if (data.isEmpty()) {
data = QString().number(value) + " " + chan.units();;
}
} else if (chan.datatype() == schema::BOOL) { } else if (chan.datatype() == schema::BOOL) {
data = (it.value().toBool() ? STR_TR_Yes : STR_TR_No); data = (it.value().toBool() ? STR_TR_Yes : STR_TR_No);
} else if (chan.datatype() == schema::DOUBLE) { } else if (chan.datatype() == schema::DOUBLE) {
@ -1597,6 +1607,8 @@ void Daily::Load(QDate date)
if (cpap) { if (cpap) {
float hours=day->hours(MT_CPAP); float hours=day->hours(MT_CPAP);
if (GraphView->isEmpty() && (hours>0)) { if (GraphView->isEmpty() && (hours>0)) {
// TODO: Eventually we should get isBrick from the loader, since some summary days
// on a non-brick might legitimately have no graph data.
if (!p_profile->hasChannel(CPAP_Obstructive) && !p_profile->hasChannel(CPAP_Hypopnea)) { if (!p_profile->hasChannel(CPAP_Obstructive) && !p_profile->hasChannel(CPAP_Hypopnea)) {
GraphView->setEmptyText(STR_Empty_Brick); GraphView->setEmptyText(STR_Empty_Brick);

View File

@ -14,9 +14,6 @@ Important: One id code per item, DO NOT CHANGE ID NUMBERS!!!
<channel id="0x1160" class="data" name="RMS9_E01" details="RMS9 Empty 1" label="E01" unit="" color="black"/> <channel id="0x1160" class="data" name="RMS9_E01" details="RMS9 Empty 1" label="E01" unit="" color="black"/>
<channel id="0x1161" class="data" name="RMS9_E02" details="RMS9 Empty 2" label="E02" unit="" color="black"/> <channel id="0x1161" class="data" name="RMS9_E02" details="RMS9 Empty 2" label="E02" unit="" color="black"/>
<channel id="0x1162" class="data" name="SetPressure" details="Set Pressure" label="Pressure" unit="" color="black"/> <channel id="0x1162" class="data" name="SetPressure" details="Set Pressure" label="Pressure" unit="" color="black"/>
<channel id="0x1163" class="data" name="BrokenSummary" details="Broken Summary" label="Broken Summary" unit="" color="black"/>
<channel id="0x1164" class="data" name="BrokenWaveform" details="Broken Waveform" label="Broken Waveform" unit="" color="black"/>
<channel id="0x1166" class="data" name="PRS1_0F" details="Unknown 0F" label="U0F" unit="?" color="dark green"/> <channel id="0x1166" class="data" name="PRS1_0F" details="Unknown 0F" label="U0F" unit="?" color="dark green"/>
<channel id="0x1167" class="data" name="IntUnk1" details="Unknown 1" label="Unknown 1" unit="?" color="dark green"/> <channel id="0x1167" class="data" name="IntUnk1" details="Unknown 1" label="Unknown 1" unit="?" color="dark green"/>
<channel id="0x1168" class="data" name="IntUnk2" details="Unknown 2" label="Unknown 2" unit="?" color="dark green"/> <channel id="0x1168" class="data" name="IntUnk2" details="Unknown 2" label="Unknown 2" unit="?" color="dark green"/>

View File

@ -6,6 +6,19 @@
Which was written and copyright 2011-2018 &copy; Mark Watkins Which was written and copyright 2011-2018 &copy; Mark Watkins
</p> </p>
<p>
<b>Changes and fixes in OSCAR v1.1.0-BETA?</b>
<ul>
<li>[fix] Improved import of Philips Respironics settings. In particular:
<ul>
<li>The settings for PC, S, and S/T modes are now displayed correctly.</li>
<li>AVAPS settings are now displayed correctly, including target tidal volume.</li>
<li>Backup breath settings are now imported and displayed.</li>
<li>The settings for CPAP-Check and Auto-Trial modes are now displayed correctly.</li>
</ul>
<li>[fix] Several crashes have been fixed.
</ul>
<p> <p>
<b>Changes and fixes in OSCAR v1.1.0-beta-2</b> <b>Changes and fixes in OSCAR v1.1.0-beta-2</b>
<ul> <ul>
@ -15,7 +28,6 @@ Which was written and copyright 2011-2018 &copy; Mark Watkins
<li>[fix] Improved import of Philips Respironics flex and humidification settings</li> <li>[fix] Improved import of Philips Respironics flex and humidification settings</li>
<li>[new]Extensive re-organization of the ResMed loader to facilitate understanding and future improvements</li> <li>[new]Extensive re-organization of the ResMed loader to facilitate understanding and future improvements</li>
</ul> </ul>
</b>
<p> <p>
<b>Changes and fixes in OSCAR v1.1.0-beta-1</b> <b>Changes and fixes in OSCAR v1.1.0-beta-1</b>

View File

@ -53,7 +53,12 @@ static QString eventListTypeName(EventListType t)
// for names, make sure there aren't duplicate values, etc. For now we just fill the // for names, make sure there aren't duplicate values, etc. For now we just fill the
// below by hand. // below by hand.
#define CHANNELNAME(CH) if (i == CH) { s = #CH; break; } #define CHANNELNAME(CH) if (i == CH) { s = #CH; break; }
extern ChannelID PRS1_Mode;
extern ChannelID PRS1_TimedBreath, PRS1_HumidMode, PRS1_TubeTemp; extern ChannelID PRS1_TimedBreath, PRS1_HumidMode, PRS1_TubeTemp;
extern ChannelID PRS1_FlexLock, PRS1_TubeLock, PRS1_RampType;
extern ChannelID PRS1_BackupBreathMode, PRS1_BackupBreathRate, PRS1_BackupBreathTi;
extern ChannelID PRS1_AutoTrial, PRS1_EZStart, PRS1_RiseTime, PRS1_RiseTimeLock;
extern ChannelID PRS1_VariableBreathing;
extern ChannelID RMS9_EPR, RMS9_EPRLevel, RMS9_Mode, RMS9_SmartStart, RMS9_HumidStatus, RMS9_HumidLevel, extern ChannelID RMS9_EPR, RMS9_EPRLevel, RMS9_Mode, RMS9_SmartStart, RMS9_HumidStatus, RMS9_HumidLevel,
RMS9_PtAccess, RMS9_Mask, RMS9_ABFilter, RMS9_ClimateControl, RMS9_TubeType, RMS9_PtAccess, RMS9_Mask, RMS9_ABFilter, RMS9_ClimateControl, RMS9_TubeType,
@ -79,23 +84,35 @@ static QString settingChannel(ChannelID i)
CHANNELNAME(CPAP_RampTime); CHANNELNAME(CPAP_RampTime);
CHANNELNAME(CPAP_RampPressure); CHANNELNAME(CPAP_RampPressure);
CHANNELNAME(CPAP_RespRate); CHANNELNAME(CPAP_RespRate);
CHANNELNAME(CPAP_TidalVolume);
CHANNELNAME(OXI_Pulse); CHANNELNAME(OXI_Pulse);
// PRS1-specific channels
CHANNELNAME(PRS1_Mode);
CHANNELNAME(PRS1_FlexMode); CHANNELNAME(PRS1_FlexMode);
CHANNELNAME(PRS1_FlexLevel); CHANNELNAME(PRS1_FlexLevel);
CHANNELNAME(PRS1_HumidStatus); CHANNELNAME(PRS1_HumidStatus);
CHANNELNAME(PRS1_HumidMode); CHANNELNAME(PRS1_HumidMode);
CHANNELNAME(PRS1_TubeTemp); CHANNELNAME(PRS1_TubeTemp);
CHANNELNAME(PRS1_HumidLevel); CHANNELNAME(PRS1_HumidLevel);
CHANNELNAME(PRS1_SysLock); CHANNELNAME(PRS1_MaskResistLock);
CHANNELNAME(PRS1_SysOneResistSet); CHANNELNAME(PRS1_MaskResistSet);
CHANNELNAME(PRS1_SysOneResistStat);
CHANNELNAME(PRS1_TimedBreath); CHANNELNAME(PRS1_TimedBreath);
CHANNELNAME(PRS1_HoseDiam); CHANNELNAME(PRS1_HoseDiam);
CHANNELNAME(PRS1_AutoOn); CHANNELNAME(PRS1_AutoOn);
CHANNELNAME(PRS1_AutoOff); CHANNELNAME(PRS1_AutoOff);
CHANNELNAME(PRS1_MaskAlert); CHANNELNAME(PRS1_MaskAlert);
CHANNELNAME(PRS1_ShowAHI); CHANNELNAME(PRS1_ShowAHI);
CHANNELNAME(CPAP_BrokenSummary); CHANNELNAME(PRS1_FlexLock);
CHANNELNAME(PRS1_TubeLock);
CHANNELNAME(PRS1_RampType);
CHANNELNAME(PRS1_BackupBreathMode);
CHANNELNAME(PRS1_BackupBreathRate);
CHANNELNAME(PRS1_BackupBreathTi);
CHANNELNAME(PRS1_AutoTrial);
CHANNELNAME(PRS1_EZStart);
CHANNELNAME(PRS1_RiseTime);
CHANNELNAME(PRS1_RiseTimeLock);
// ZEO-specific channels
CHANNELNAME(ZEO_Awakenings); CHANNELNAME(ZEO_Awakenings);
CHANNELNAME(ZEO_MorningFeel); CHANNELNAME(ZEO_MorningFeel);
CHANNELNAME(ZEO_TimeInWake); CHANNELNAME(ZEO_TimeInWake);
@ -160,7 +177,7 @@ static QString eventChannel(ChannelID i)
CHANNELNAME(CPAP_Test2); CHANNELNAME(CPAP_Test2);
CHANNELNAME(CPAP_PressurePulse); CHANNELNAME(CPAP_PressurePulse);
CHANNELNAME(CPAP_Pressure); CHANNELNAME(CPAP_Pressure);
CHANNELNAME(PRS1_0E); CHANNELNAME(PRS1_VariableBreathing);
CHANNELNAME(CPAP_PressureSet); CHANNELNAME(CPAP_PressureSet);
CHANNELNAME(CPAP_IPAPSet); CHANNELNAME(CPAP_IPAPSet);
CHANNELNAME(CPAP_EPAPSet); CHANNELNAME(CPAP_EPAPSet);

View File

@ -244,7 +244,7 @@ QString Welcome::GenerateCPAPHTML()
EventDataType ipap = day->percentile(pressChanID, perc/100.0); EventDataType ipap = day->percentile(pressChanID, perc/100.0);
EventDataType epap = day->percentile(CPAP_EPAP, perc/100.0); EventDataType epap = day->percentile(CPAP_EPAP, perc/100.0);
html += tr("Your machine was under %1-%2 %3 for %4% of the time.").arg(epap).arg(ipap).arg(schema::channel[pressChanID].units()).arg(perc); html += tr("Your machine was under %1-%2 %3 for %4% of the time.").arg(epap).arg(ipap).arg(schema::channel[pressChanID].units()).arg(perc);
} else if (cpapmode == MODE_ASV){ } else if (cpapmode == MODE_ASV || cpapmode == MODE_AVAPS){
EventDataType ipap = day->percentile(pressChanID, perc/100.0); EventDataType ipap = day->percentile(pressChanID, perc/100.0);
EventDataType epap = qRound(day->settings_wavg(CPAP_EPAP)); EventDataType epap = qRound(day->settings_wavg(CPAP_EPAP));