mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
PRS1 F0 Humidification level fix
This commit is contained in:
parent
c491edc3a4
commit
5ef1d90414
@ -302,6 +302,8 @@ QString STR_TR_Start;
|
|||||||
QString STR_TR_End;
|
QString STR_TR_End;
|
||||||
QString STR_TR_On;
|
QString STR_TR_On;
|
||||||
QString STR_TR_Off;
|
QString STR_TR_Off;
|
||||||
|
QString STR_TR_Yes;
|
||||||
|
QString STR_TR_No;
|
||||||
|
|
||||||
QString STR_TR_Min; // Minimum
|
QString STR_TR_Min; // Minimum
|
||||||
QString STR_TR_Max; // Maximum
|
QString STR_TR_Max; // Maximum
|
||||||
@ -485,6 +487,8 @@ void initializeStrings()
|
|||||||
STR_TR_End = QObject::tr("End");
|
STR_TR_End = QObject::tr("End");
|
||||||
STR_TR_On = QObject::tr("On");
|
STR_TR_On = QObject::tr("On");
|
||||||
STR_TR_Off = QObject::tr("Off");
|
STR_TR_Off = QObject::tr("Off");
|
||||||
|
STR_TR_Yes = QObject::tr("Yes");
|
||||||
|
STR_TR_No = QObject::tr("No");
|
||||||
|
|
||||||
STR_TR_Min = QObject::tr("Min"); // Minimum
|
STR_TR_Min = QObject::tr("Min"); // Minimum
|
||||||
STR_TR_Max = QObject::tr("Max"); // Maximum
|
STR_TR_Max = QObject::tr("Max"); // Maximum
|
||||||
|
@ -284,6 +284,8 @@ extern QString STR_TR_Start;
|
|||||||
extern QString STR_TR_End;
|
extern QString STR_TR_End;
|
||||||
extern QString STR_TR_On;
|
extern QString STR_TR_On;
|
||||||
extern QString STR_TR_Off;
|
extern QString STR_TR_Off;
|
||||||
|
extern QString STR_TR_Yes;
|
||||||
|
extern QString STR_TR_No;
|
||||||
|
|
||||||
|
|
||||||
extern QString STR_TR_Min; // Minimum
|
extern QString STR_TR_Min; // Minimum
|
||||||
|
@ -1202,7 +1202,7 @@ bool PRS1Import::ParseSummaryF0()
|
|||||||
session->settings[PRS1_MaskAlert] = (bool) (data[0x0c] & 0x08);
|
session->settings[PRS1_MaskAlert] = (bool) (data[0x0c] & 0x08);
|
||||||
session->settings[PRS1_ShowAHI] = (bool) (data[0x0c] & 0x04);
|
session->settings[PRS1_ShowAHI] = (bool) (data[0x0c] & 0x04);
|
||||||
session->settings[PRS1_HumidStatus] = (bool)(data[0x09] & 0x80); // Humidifier Connected
|
session->settings[PRS1_HumidStatus] = (bool)(data[0x09] & 0x80); // Humidifier Connected
|
||||||
session->settings[PRS1_HumitSetting] = (int)(data[0x09] & 7); // Humidifier Value
|
session->settings[PRS1_HumidLevel] = (int)(data[0x09] & 7); // Humidifier Value
|
||||||
|
|
||||||
// session->
|
// session->
|
||||||
|
|
||||||
@ -2022,6 +2022,29 @@ void PRS1Loader::Register()
|
|||||||
chan->addOption(2, QObject::tr("x2"));
|
chan->addOption(2, QObject::tr("x2"));
|
||||||
chan->addOption(3, QObject::tr("x3"));
|
chan->addOption(3, QObject::tr("x3"));
|
||||||
|
|
||||||
|
channel.add(GRP_CPAP, chan = new Channel(PRS1_HumidStatus = 0xe101, SETTING, SESSION,
|
||||||
|
"PRS1HumidStat",
|
||||||
|
QObject::tr("Humidifier Status"),
|
||||||
|
QObject::tr("PRS1 humidifier connected?"),
|
||||||
|
QObject::tr("Humidifier Status"),
|
||||||
|
"", DEFAULT, Qt::green));
|
||||||
|
chan->addOption(0, STR_TR_No);
|
||||||
|
chan->addOption(1, STR_TR_Yes);
|
||||||
|
|
||||||
|
channel.add(GRP_CPAP, chan = new Channel(PRS1_HumidLevel = 0xe102, SETTING, SESSION,
|
||||||
|
"PRS1HumidLevel",
|
||||||
|
QObject::tr("Humidification Level"),
|
||||||
|
QObject::tr("PRS1 Humidification level"),
|
||||||
|
QObject::tr("Humid. Lvl."),
|
||||||
|
"", DEFAULT, Qt::green));
|
||||||
|
chan->addOption(0, STR_TR_Off);
|
||||||
|
chan->addOption(1, QObject::tr("x1"));
|
||||||
|
chan->addOption(2, QObject::tr("x2"));
|
||||||
|
chan->addOption(3, QObject::tr("x3"));
|
||||||
|
chan->addOption(4, QObject::tr("x4"));
|
||||||
|
chan->addOption(5, QObject::tr("x5"));
|
||||||
|
|
||||||
|
|
||||||
QString unknowndesc=QObject::tr("Unknown PRS1 Code %1");
|
QString unknowndesc=QObject::tr("Unknown PRS1 Code %1");
|
||||||
QString unknownname=QObject::tr("PRS1_%1");
|
QString unknownname=QObject::tr("PRS1_%1");
|
||||||
QString unknownshort=QObject::tr("PRS1_%1");
|
QString unknownshort=QObject::tr("PRS1_%1");
|
||||||
|
@ -176,6 +176,10 @@ class PRS1Loader : public CPAPLoader
|
|||||||
virtual ChannelID PresReliefMode() { return PRS1_FlexMode; }
|
virtual ChannelID PresReliefMode() { return PRS1_FlexMode; }
|
||||||
virtual ChannelID PresReliefLevel() { return PRS1_FlexLevel; }
|
virtual ChannelID PresReliefLevel() { return PRS1_FlexLevel; }
|
||||||
|
|
||||||
|
virtual ChannelID HumidifierConnected() { return PRS1_HumidStatus; }
|
||||||
|
virtual ChannelID HumidifierLevel() { return PRS1_HumidLevel; }
|
||||||
|
|
||||||
|
|
||||||
QHash<SessionID, PRS1Import*> sesstasks;
|
QHash<SessionID, PRS1Import*> sesstasks;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -33,7 +33,7 @@ ChannelID RMS9_E01, RMS9_E02, RMS9_SetPressure, RMS9_MaskOnTime;
|
|||||||
ChannelID INTELLIPAP_Unknown1, INTELLIPAP_Unknown2;
|
ChannelID INTELLIPAP_Unknown1, INTELLIPAP_Unknown2;
|
||||||
|
|
||||||
ChannelID PRS1_00, PRS1_01, PRS1_08, PRS1_0A, PRS1_0B, PRS1_0C, PRS1_0E, PRS1_0F, CPAP_LargeLeak, PRS1_12,
|
ChannelID PRS1_00, PRS1_01, PRS1_08, PRS1_0A, PRS1_0B, PRS1_0C, PRS1_0E, PRS1_0F, CPAP_LargeLeak, PRS1_12,
|
||||||
PRS1_FlexMode, PRS1_FlexLevel, PRS1_HumidStatus, PRS1_HumitSetting, PRS1_SysLock,
|
PRS1_FlexMode, PRS1_FlexLevel, PRS1_HumidStatus, PRS1_HumidLevel, PRS1_SysLock,
|
||||||
PRS1_SysOneResistStat,
|
PRS1_SysOneResistStat,
|
||||||
PRS1_SysOneResistSet, PRS1_HoseDiam, PRS1_AutoOn, PRS1_AutoOff, PRS1_MaskAlert, PRS1_ShowAHI;
|
PRS1_SysOneResistSet, PRS1_HoseDiam, PRS1_AutoOn, PRS1_AutoOff, PRS1_MaskAlert, PRS1_ShowAHI;
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ extern ChannelID CPAP_IPAP, CPAP_IPAPLo, CPAP_IPAPHi, CPAP_EPAP, CPAP_EPAPLo, CP
|
|||||||
extern ChannelID RMS9_E01, RMS9_E02, RMS9_SetPressure, RMS9_MaskOnTime;
|
extern ChannelID RMS9_E01, RMS9_E02, RMS9_SetPressure, RMS9_MaskOnTime;
|
||||||
extern ChannelID PRS1_00, PRS1_01, PRS1_08, PRS1_0A, PRS1_0B, PRS1_0C, PRS1_0E, PRS1_0F, CPAP_LargeLeak,
|
extern ChannelID PRS1_00, PRS1_01, PRS1_08, PRS1_0A, PRS1_0B, PRS1_0C, PRS1_0E, PRS1_0F, CPAP_LargeLeak,
|
||||||
PRS1_12,
|
PRS1_12,
|
||||||
PRS1_FlexMode, PRS1_FlexLevel, PRS1_HumidStatus, PRS1_HumitSetting, CPAP_HumidSetting, PRS1_SysLock,
|
PRS1_FlexMode, PRS1_FlexLevel, PRS1_HumidStatus, PRS1_HumidLevel, CPAP_HumidSetting, PRS1_SysLock,
|
||||||
PRS1_SysOneResistStat,
|
PRS1_SysOneResistStat,
|
||||||
PRS1_SysOneResistSet, PRS1_HoseDiam, PRS1_AutoOn, PRS1_AutoOff, PRS1_MaskAlert, PRS1_ShowAHI;
|
PRS1_SysOneResistSet, PRS1_HoseDiam, PRS1_AutoOn, PRS1_AutoOff, PRS1_MaskAlert, PRS1_ShowAHI;
|
||||||
|
|
||||||
|
@ -122,6 +122,8 @@ public:
|
|||||||
virtual QString PresReliefLabel() { return QString(""); }
|
virtual QString PresReliefLabel() { return QString(""); }
|
||||||
virtual ChannelID PresReliefMode() { return NoChannel; }
|
virtual ChannelID PresReliefMode() { return NoChannel; }
|
||||||
virtual ChannelID PresReliefLevel() { return NoChannel; }
|
virtual ChannelID PresReliefLevel() { return NoChannel; }
|
||||||
|
virtual ChannelID HumidifierConnected() { return NoChannel; }
|
||||||
|
virtual ChannelID HumidifierLevel() { return CPAP_HumidSetting; }
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -477,7 +477,6 @@ void init()
|
|||||||
RMS9_E01 = schema::channel["RMS9_E01"].id();
|
RMS9_E01 = schema::channel["RMS9_E01"].id();
|
||||||
RMS9_E02 = schema::channel["RMS9_E02"].id();
|
RMS9_E02 = schema::channel["RMS9_E02"].id();
|
||||||
RMS9_SetPressure = schema::channel["SetPressure"].id(); // TODO: this isn't needed anymore
|
RMS9_SetPressure = schema::channel["SetPressure"].id(); // TODO: this isn't needed anymore
|
||||||
PRS1_HumidStatus = schema::channel["HumidStat"].id();
|
|
||||||
CPAP_HumidSetting = schema::channel["HumidSet"].id();
|
CPAP_HumidSetting = schema::channel["HumidSet"].id();
|
||||||
PRS1_SysLock = schema::channel["SysLock"].id();
|
PRS1_SysLock = schema::channel["SysLock"].id();
|
||||||
PRS1_SysOneResistStat = schema::channel["SysOneResistStat"].id();
|
PRS1_SysOneResistStat = schema::channel["SysOneResistStat"].id();
|
||||||
|
@ -972,10 +972,14 @@ QString Daily::getMachineSettings(Day * cpap) {
|
|||||||
|
|
||||||
ChannelID pr_level_chan = NoChannel;
|
ChannelID pr_level_chan = NoChannel;
|
||||||
ChannelID pr_mode_chan = NoChannel;
|
ChannelID pr_mode_chan = NoChannel;
|
||||||
|
ChannelID hum_stat_chan = NoChannel;
|
||||||
|
ChannelID hum_level_chan = NoChannel;
|
||||||
CPAPLoader * loader = dynamic_cast<CPAPLoader *>(cpap->machine->loader());
|
CPAPLoader * loader = dynamic_cast<CPAPLoader *>(cpap->machine->loader());
|
||||||
if (loader) {
|
if (loader) {
|
||||||
pr_level_chan = loader->PresReliefLevel();
|
pr_level_chan = loader->PresReliefLevel();
|
||||||
pr_mode_chan = loader->PresReliefMode();
|
pr_mode_chan = loader->PresReliefMode();
|
||||||
|
hum_stat_chan = loader->HumidifierConnected();
|
||||||
|
hum_level_chan = loader->HumidifierLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((pr_level_chan != NoChannel) && (cpap->settingExists(pr_level_chan))) {
|
if ((pr_level_chan != NoChannel) && (cpap->settingExists(pr_level_chan))) {
|
||||||
@ -987,12 +991,12 @@ QString Daily::getMachineSettings(Day * cpap) {
|
|||||||
.arg(flexstr);
|
.arg(flexstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString mclass=cpap->machine->loaderName();
|
|
||||||
if (mclass==STR_MACH_PRS1 || mclass==STR_MACH_FPIcon) {
|
if (cpap->settingExists(hum_level_chan)) {
|
||||||
int humid=round(cpap->settings_wavg(CPAP_HumidSetting));
|
int humid=round(cpap->settings_wavg(hum_level_chan));
|
||||||
html+=QString("<tr><td><a class='info' href='#'>"+STR_TR_Humidifier+"<span>%1</span></a></td><td colspan=4>%2</td></tr>")
|
html+=QString("<tr><td><a class='info' href='#'>"+schema::channel[hum_level_chan].label()+"<span>%1</span></a></td><td colspan=4>%2</td></tr>")
|
||||||
.arg(schema::channel[CPAP_HumidSetting].description())
|
.arg(schema::channel[hum_level_chan].description())
|
||||||
.arg(humid==0 ? STR_GEN_Off : "x"+QString::number(humid));
|
.arg(humid == 0 ? STR_GEN_Off : "x"+QString::number(humid));
|
||||||
}
|
}
|
||||||
html+="</table>";
|
html+="</table>";
|
||||||
html+="<hr/>\n";
|
html+="<hr/>\n";
|
||||||
|
@ -72,18 +72,6 @@ Important: One id code per item, DO NOT CHANGE ID NUMBERS!!!
|
|||||||
</group>
|
</group>
|
||||||
<group name="PRS1">
|
<group name="PRS1">
|
||||||
<!-- PRS1 Settings -->
|
<!-- PRS1 Settings -->
|
||||||
<channel id="0xe101" class="setting" scope="!session" name="HumidStat" details="Humidifier Status" label="Hum. Status" type="bool">
|
|
||||||
<option id="0" value="Off"/>
|
|
||||||
<option id="1" value="On"/>
|
|
||||||
</channel>
|
|
||||||
<channel id="0xe102" class="setting" scope="!session" name="HumidSet" details="Humidifier Setting" label="Hum. Setting" type="integer">
|
|
||||||
<Option id="0" value="Off"/>
|
|
||||||
<Option id="1" value="x1"/>
|
|
||||||
<Option id="2" value="x2"/>
|
|
||||||
<Option id="3" value="x3"/>
|
|
||||||
<Option id="4" value="x4"/>
|
|
||||||
<Option id="5" value="x5"/>
|
|
||||||
</channel>
|
|
||||||
<channel id="0xe103" class="setting" scope="!session" name="SysOneResistStat" details="System One Resistance Status" label="S1 Resist. Status" type="bool">
|
<channel id="0xe103" class="setting" scope="!session" name="SysOneResistStat" details="System One Resistance Status" label="S1 Resist. Status" type="bool">
|
||||||
<Option id="0" value="Off"/>
|
<Option id="0" value="Off"/>
|
||||||
<Option id="1" value="On"/>
|
<Option id="1" value="On"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user