Merge PRS1Import::ParseSummaryF* functionality into PRS1Import::ImportSummary.

Only PRS1Import::ParseSummaryF0V23 has disappeared, being merged into
ImportSummary. The only change it needed to subsume the functionality of
all other variants was the addition of one extra setting.

The rest of the now-unused variants will be removed next.
This commit is contained in:
sawinglogz 2019-05-27 11:05:34 -04:00
parent 44e4b25471
commit e47c4934ef
2 changed files with 12 additions and 17 deletions

View File

@ -3963,14 +3963,8 @@ bool PRS1Import::ImportSummary()
session->setPhysMax(CPAP_PS, 25);
session->setPhysMin(CPAP_PS, 0);
return this->ParseSummary();
}
bool PRS1Import::ParseSummaryF0V23()
{
bool ok;
ok = summary->ParseSummaryF0V23();
ok = this->ParseSummary();
for (int i=0; i < summary->m_parsedData.count(); i++) {
PRS1ParsedEvent* e = summary->m_parsedData.at(i);
@ -4034,6 +4028,9 @@ bool PRS1Import::ParseSummaryF0V23()
case PRS1_SETTING_HUMID_STATUS:
session->settings[PRS1_HumidStatus] = (bool) e->m_value;
break;
case PRS1_SETTING_HEATED_TUBING:
session->settings[PRS1_HeatedTubing] = (bool) e->m_value;
break;
case PRS1_SETTING_HUMID_LEVEL:
session->settings[PRS1_HumidLevel] = e->m_value;
break;
@ -4128,24 +4125,24 @@ bool PRS1Import::ParseSummary()
switch (summary->family) {
case 0:
if (summary->familyVersion == 6) {
return ParseSummaryF0V6();
return summary->ParseSummaryF0V6();
} else if (summary->familyVersion == 4) {
return ParseSummaryF0V4();
return summary->ParseSummaryF0V4();
} else {
return ParseSummaryF0V23();
return summary->ParseSummaryF0V23();
}
case 3:
return ParseSummaryF3();
return summary->ParseSummaryF3();
break;
case 5:
if (summary->familyVersion == 1) {
return ParseSummaryF5V012();
return summary->ParseSummaryF5V012();
} else if (summary->familyVersion == 0) {
return ParseSummaryF5V012();
return summary->ParseSummaryF5V012();
} else if (summary->familyVersion == 2) {
return ParseSummaryF5V012();
return summary->ParseSummaryF5V012();
} else if (summary->familyVersion == 3) {
return ParseSummaryF5V3();
return summary->ParseSummaryF5V3();
}
default:
;

View File

@ -242,8 +242,6 @@ public:
bool ParseOximetery();
//! \brief Summary parser for 50 series Family 0 CPAP/APAP models
bool ParseSummaryF0V23();
//! \brief Summary parser for 60 series Family 0 CPAP/APAP models
bool ParseSummaryF0V4();
//! \brief Summary parser for 1060 series AVAPS models