mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Temporarily show raw ResMed EPR values
This commit is contained in:
parent
92d79a7a76
commit
ffbeb5795c
@ -110,7 +110,7 @@ EventDataType Day::settings_sum(ChannelID code)
|
||||
|
||||
EventDataType Day::settings_max(ChannelID code)
|
||||
{
|
||||
EventDataType min = std::numeric_limits<EventDataType>::min();
|
||||
EventDataType min = -std::numeric_limits<EventDataType>::max();
|
||||
EventDataType max = min;
|
||||
EventDataType value;
|
||||
|
||||
@ -118,7 +118,7 @@ EventDataType Day::settings_max(ChannelID code)
|
||||
for(QList<Session *>::iterator it = sessions.begin(); it < end; ++it) {
|
||||
Session &sess = *(*it);
|
||||
if (sess.enabled()) {
|
||||
value = sess.settings.value(code, min).toDouble();
|
||||
value = sess.settings.value(code, min).toFloat();
|
||||
if (value > max) {
|
||||
max = value;
|
||||
}
|
||||
@ -139,7 +139,7 @@ EventDataType Day::settings_min(ChannelID code)
|
||||
for(QList<Session *>::iterator it = sessions.begin(); it < end; ++it) {
|
||||
Session &sess = *(*it);
|
||||
if (sess.enabled()) {
|
||||
value = sess.settings.value(code, max).toDouble();
|
||||
value = sess.settings.value(code, max).toFloat();
|
||||
if (value < min) {
|
||||
min = value;
|
||||
}
|
||||
|
@ -271,8 +271,8 @@ void ResmedLoader::ParseSTR(Machine *mach, QStringList strfiles)
|
||||
if ((sig = str.lookupSignal(RMS9_EPR))) {
|
||||
R.epr = EventDataType(sig->data[rec]) * sig->gain + sig->offset;
|
||||
}
|
||||
if ((sig = str.lookupSignal(RMS9_EPRSet))) {
|
||||
R.epr_set = EventDataType(sig->data[rec]) * sig->gain + sig->offset;
|
||||
if ((sig = str.lookupSignal(RMS9_EPRLevel))) {
|
||||
R.epr_level = EventDataType(sig->data[rec]) * sig->gain + sig->offset;
|
||||
}
|
||||
if ((sig = str.lookupSignal(CPAP_Mode))) {
|
||||
int mod = EventDataType(sig->data[rec]) * sig->gain + sig->offset;
|
||||
@ -688,9 +688,9 @@ void ResmedImport::run()
|
||||
sess->settings[CPAP_PresReliefType] = (int)PR_EPR;
|
||||
sess->settings[CPAP_PresReliefSet] = (int)R.epr;
|
||||
}
|
||||
if (R.epr_set >= 0) {
|
||||
sess->settings[RMS9_EPRSet] = (int)R.epr_set;
|
||||
sess->settings[CPAP_PresReliefMode] = (int)R.epr_set;
|
||||
if (R.epr_level >= 0) {
|
||||
sess->settings[RMS9_EPRLevel] = (int)R.epr_level;
|
||||
sess->settings[CPAP_PresReliefMode] = (int)R.epr_level;
|
||||
}
|
||||
|
||||
// Ignore all the rest of the sumary data, because there is enough available to calculate it with higher accuracy.
|
||||
@ -809,9 +809,9 @@ void ResmedImportStage2::run()
|
||||
sess->settings[CPAP_PresReliefType] = (int)PR_EPR;
|
||||
sess->settings[CPAP_PresReliefSet] = (int)R.epr;
|
||||
}
|
||||
if (R.epr_set >= 0) {
|
||||
sess->settings[RMS9_EPRSet] = (int)R.epr_set;
|
||||
sess->settings[CPAP_PresReliefMode] = (int)R.epr_set;
|
||||
if (R.epr_level >= 0) {
|
||||
sess->settings[RMS9_EPRLevel] = (int)R.epr_level;
|
||||
sess->settings[CPAP_PresReliefMode] = (int)R.epr_level;
|
||||
}
|
||||
if (R.leakmax >= 0) sess->setMax(CPAP_Leak, R.leakmax);
|
||||
if (R.leakmax >= 0) sess->setMin(CPAP_Leak, 0);
|
||||
@ -2107,14 +2107,14 @@ void ResInitModelMap()
|
||||
resmed_codes[RMS9_SetPressure].push_back("Inställt tryck");
|
||||
resmed_codes[RMS9_EPR].push_back("EPR");
|
||||
resmed_codes[RMS9_EPR].push_back("\xE5\x91\xBC\xE6\xB0\x94\xE9\x87\x8A\xE5\x8E\x8B\x28\x45\x50"); // Chinese
|
||||
resmed_codes[RMS9_EPRSet].push_back("EPR Level");
|
||||
resmed_codes[RMS9_EPRSet].push_back("EPR-Stufe");
|
||||
resmed_codes[RMS9_EPRSet].push_back("EPR-niveau");
|
||||
resmed_codes[RMS9_EPRSet].push_back("\x45\x50\x52\x20\xE6\xB0\xB4\xE5\xB9\xB3"); // Chinese
|
||||
resmed_codes[RMS9_EPRLevel].push_back("EPR Level");
|
||||
resmed_codes[RMS9_EPRLevel].push_back("EPR-Stufe");
|
||||
resmed_codes[RMS9_EPRLevel].push_back("EPR-niveau");
|
||||
resmed_codes[RMS9_EPRLevel].push_back("\x45\x50\x52\x20\xE6\xB0\xB4\xE5\xB9\xB3"); // Chinese
|
||||
|
||||
resmed_codes[RMS9_EPRSet].push_back("Niveau EPR");
|
||||
resmed_codes[RMS9_EPRSet].push_back("EPR-nivå");
|
||||
resmed_codes[RMS9_EPRSet].push_back("EPR-nivå");
|
||||
resmed_codes[RMS9_EPRLevel].push_back("Niveau EPR");
|
||||
resmed_codes[RMS9_EPRLevel].push_back("EPR-nivå");
|
||||
resmed_codes[RMS9_EPRLevel].push_back("EPR-nivå");
|
||||
resmed_codes[CPAP_PressureMax].push_back("Max Pressure");
|
||||
resmed_codes[CPAP_PressureMax].push_back("Max. Druck");
|
||||
resmed_codes[CPAP_PressureMax].push_back("Max druk");
|
||||
|
@ -122,7 +122,7 @@ struct STRRecord
|
||||
max_ipap = -1;
|
||||
min_ipap = -1;
|
||||
epr = -1;
|
||||
epr_set = -1;
|
||||
epr_level = -1;
|
||||
sessionid = 0;
|
||||
|
||||
ahi = -1;
|
||||
@ -157,7 +157,7 @@ struct STRRecord
|
||||
max_ipap = copy.max_ipap;
|
||||
min_ipap = copy.min_ipap;
|
||||
epr = copy.epr;
|
||||
epr_set = copy.epr_set;
|
||||
epr_level = copy.epr_level;
|
||||
sessionid = copy.sessionid;
|
||||
ahi = copy.ahi;
|
||||
ai = copy.ai;
|
||||
@ -188,7 +188,7 @@ struct STRRecord
|
||||
EventDataType max_ipap;
|
||||
EventDataType min_ipap;
|
||||
EventDataType epr;
|
||||
EventDataType epr_set;
|
||||
EventDataType epr_level;
|
||||
quint32 sessionid;
|
||||
EventDataType ahi;
|
||||
EventDataType ai;
|
||||
|
@ -638,7 +638,7 @@ ChannelID CPAP_IPAP, CPAP_IPAPLo, CPAP_IPAPHi, CPAP_EPAP, CPAP_EPAPLo, CPAP_EPAP
|
||||
CPAP_Test2;
|
||||
|
||||
|
||||
ChannelID RMS9_E01, RMS9_E02, RMS9_EPR, RMS9_EPRSet, RMS9_SetPressure, RMS9_MaskOnTime;
|
||||
ChannelID RMS9_E01, RMS9_E02, RMS9_EPR, RMS9_EPRLevel, RMS9_SetPressure, RMS9_MaskOnTime;
|
||||
ChannelID INTP_SmartFlex;
|
||||
ChannelID INTELLIPAP_Unknown1, INTELLIPAP_Unknown2;
|
||||
|
||||
|
@ -100,7 +100,7 @@ extern ChannelID CPAP_IPAP, CPAP_IPAPLo, CPAP_IPAPHi, CPAP_EPAP, CPAP_EPAPLo, CP
|
||||
CPAP_UserFlag1, CPAP_UserFlag2, CPAP_UserFlag3, CPAP_BrokenSummary, CPAP_BrokenWaveform, CPAP_RDI,
|
||||
CPAP_PresReliefSet, CPAP_PresReliefMode, CPAP_PresReliefType, CPAP_Test1, CPAP_Test2;
|
||||
|
||||
extern ChannelID RMS9_E01, RMS9_E02, RMS9_EPR, RMS9_EPRSet, RMS9_SetPressure, RMS9_MaskOnTime;
|
||||
extern ChannelID RMS9_E01, RMS9_E02, RMS9_EPR, RMS9_EPRLevel, RMS9_SetPressure, RMS9_MaskOnTime;
|
||||
extern ChannelID INTP_SmartFlex;
|
||||
extern ChannelID PRS1_00, PRS1_01, PRS1_08, PRS1_0A, PRS1_0B, PRS1_0C, PRS1_0E, PRS1_0F, CPAP_LargeLeak,
|
||||
PRS1_12,
|
||||
|
@ -451,7 +451,7 @@ void init()
|
||||
RMS9_E01 = schema::channel["RMS9_E01"].id();
|
||||
RMS9_E02 = schema::channel["RMS9_E02"].id();
|
||||
RMS9_EPR = schema::channel["EPR"].id();
|
||||
RMS9_EPRSet = schema::channel["EPRSet"].id();
|
||||
RMS9_EPRLevel = schema::channel["EPRLevel"].id();
|
||||
RMS9_SetPressure = schema::channel["SetPressure"].id();
|
||||
PRS1_FlexMode = schema::channel["FlexMode"].id();
|
||||
PRS1_FlexSet = schema::channel["FlexSet"].id();
|
||||
|
@ -957,7 +957,15 @@ QString Daily::getMachineSettings(Day * cpap) {
|
||||
if (cpap->settingExists(CPAP_PresReliefType)) {
|
||||
int i=cpap->settings_max(CPAP_PresReliefType);
|
||||
int j=cpap->settings_max(CPAP_PresReliefMode);
|
||||
QString flexstr=(i>1) ? schema::channel[CPAP_PresReliefType].option(i)+" x"+QString::number(j) : STR_TR_None;
|
||||
QString flexstr;
|
||||
|
||||
if (cpap->machine->GetClass() == STR_MACH_ResMed) {
|
||||
// this is temporary..
|
||||
flexstr = QString(tr("EPR:%1 EPR_LEVEL:%2")).arg(cpap->settings_max(RMS9_EPR)).arg(cpap->settings_max(RMS9_EPRLevel));
|
||||
} else {
|
||||
flexstr = (i>1) ? schema::channel[CPAP_PresReliefType].option(i)+" x"+QString::number(j) : STR_TR_None;
|
||||
}
|
||||
|
||||
html+=QString("<tr><td><a class='info' href='#'>%1<span>%2</span></a></td><td colspan=4>%3</td></tr>")
|
||||
.arg(STR_TR_PrRelief)
|
||||
.arg(schema::channel[CPAP_PresReliefType].description())
|
||||
|
@ -162,7 +162,7 @@ Important: One id code per item, DO NOT CHANGE ID NUMBERS!!!
|
||||
<Option id="2" value="Full Time"/>
|
||||
<Option id="3" value="EPR?"/>
|
||||
</channel>
|
||||
<channel id="0xe202" class="setting" scope="!session" name="EPRSet" details="EPR Setting" label="EPR Setting" type="integer">
|
||||
<channel id="0xe202" class="setting" scope="!session" name="EPRLevel" details="EPR Setting" label="EPR Setting" type="integer">
|
||||
<Option id="0" value="0"/>
|
||||
<Option id="1" value="1"/>
|
||||
<Option id="2" value="2"/>
|
||||
|
@ -234,7 +234,7 @@ Overview::Overview(QWidget *parent, gGraphView *shared) :
|
||||
//set->addSlice(PRS1_SysOneResistSet,COLOR_Gray,ST_SETAVG);
|
||||
set->addSlice(CPAP_HumidSetting, COLOR_Blue, ST_SETWAVG);
|
||||
set->addSlice(CPAP_PresReliefSet, COLOR_Red, ST_SETWAVG);
|
||||
//set->addSlice(RMS9_EPRSet,COLOR_Green,ST_SETWAVG);
|
||||
//set->addSlice(RMS9_EPRLevel,COLOR_Green,ST_SETWAVG);
|
||||
//set->addSlice(INTP_SmartFlex,COLOR_Purple,ST_SETWAVG);
|
||||
SET->AddLayer(set);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user