mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Update unexpected data alert for PRS1 900X110 based on new sample data.
Also add support for auto-trial duration on 460P.
This commit is contained in:
parent
8bfc2195d1
commit
c245eb5a0c
@ -1260,7 +1260,7 @@ bool PRS1DataChunk::ParseSettingsF5V3(const unsigned char* data, int size)
|
|||||||
breath_rate = data[pos+1];
|
breath_rate = data[pos+1];
|
||||||
timed_inspiration = data[pos+2];
|
timed_inspiration = data[pos+2];
|
||||||
if (breath_rate < 4 || breath_rate > 16) UNEXPECTED_VALUE(breath_rate, "4-16");
|
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_MODE, PRS1Backup_Fixed));
|
||||||
this->AddEvent(new PRS1ParsedSettingEvent(PRS1_SETTING_BACKUP_BREATH_RATE, breath_rate)); // BPM
|
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));
|
this->AddEvent(new PRS1ScaledSettingEvent(PRS1_SETTING_BACKUP_TIMED_INSPIRATION, timed_inspiration, 0.1));
|
||||||
|
@ -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.
|
// TODO: Where is altitude compensation set? We've seen it on 261CA.
|
||||||
|
|
||||||
CHECK_VALUE(data[0x10], 0);
|
CHECK_VALUE(data[0x10], 0);
|
||||||
|
int autotrial_duration = data[0x11];
|
||||||
if (cpapmode == PRS1_MODE_AUTOTRIAL) {
|
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 {
|
} else {
|
||||||
CHECK_VALUE(data[0x11], 0);
|
CHECK_VALUE(autotrial_duration, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user