diff --git a/oscar/SleepLib/loader_plugins/prs1_parser_asv.cpp b/oscar/SleepLib/loader_plugins/prs1_parser_asv.cpp index a5fb6526..f13ce76c 100644 --- a/oscar/SleepLib/loader_plugins/prs1_parser_asv.cpp +++ b/oscar/SleepLib/loader_plugins/prs1_parser_asv.cpp @@ -1260,7 +1260,7 @@ bool PRS1DataChunk::ParseSettingsF5V3(const unsigned char* data, int size) breath_rate = data[pos+1]; timed_inspiration = data[pos+2]; if (breath_rate < 4 || breath_rate > 16) UNEXPECTED_VALUE(breath_rate, "4-16"); - if (timed_inspiration < 12 || timed_inspiration > 24) UNEXPECTED_VALUE(timed_inspiration, "12-24"); + if (timed_inspiration < 12 || timed_inspiration > 25) UNEXPECTED_VALUE(timed_inspiration, "12-25"); this->AddEvent(new PRS1ParsedSettingEvent(PRS1_SETTING_BACKUP_BREATH_MODE, PRS1Backup_Fixed)); this->AddEvent(new PRS1ParsedSettingEvent(PRS1_SETTING_BACKUP_BREATH_RATE, breath_rate)); // BPM this->AddEvent(new PRS1ScaledSettingEvent(PRS1_SETTING_BACKUP_TIMED_INSPIRATION, timed_inspiration, 0.1)); diff --git a/oscar/SleepLib/loader_plugins/prs1_parser_xpap.cpp b/oscar/SleepLib/loader_plugins/prs1_parser_xpap.cpp index c5643505..9f2e9b6f 100644 --- a/oscar/SleepLib/loader_plugins/prs1_parser_xpap.cpp +++ b/oscar/SleepLib/loader_plugins/prs1_parser_xpap.cpp @@ -1100,10 +1100,12 @@ bool PRS1DataChunk::ParseSettingsF0V45(const unsigned char* data, int size) // TODO: Where is altitude compensation set? We've seen it on 261CA. CHECK_VALUE(data[0x10], 0); + int autotrial_duration = data[0x11]; if (cpapmode == PRS1_MODE_AUTOTRIAL) { - CHECK_VALUE(data[0x11], 7); // 7-day duration? + CHECK_VALUES(autotrial_duration, 7, 30); + this->AddEvent(new PRS1ParsedSettingEvent(PRS1_SETTING_AUTO_TRIAL, autotrial_duration)); } else { - CHECK_VALUE(data[0x11], 0); + CHECK_VALUE(autotrial_duration, 0); } return true;