mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 20:20:44 +00:00
Identify previously unknown Viatom vibration field.
This commit is contained in:
parent
cdeba58c5d
commit
f40428f9fe
@ -352,9 +352,9 @@ QList<ViatomFile::Record> ViatomFile::ReadData()
|
|||||||
// Read all Pulse, SPO2 and Motion data
|
// Read all Pulse, SPO2 and Motion data
|
||||||
do {
|
do {
|
||||||
ViatomFile::Record rec;
|
ViatomFile::Record rec;
|
||||||
in >> rec.spo2 >> rec.hr >> rec.oximetry_invalid >> rec.motion >> rec._unk;
|
in >> rec.spo2 >> rec.hr >> rec.oximetry_invalid >> rec.motion >> rec.vibration;
|
||||||
CHECK_VALUES(rec.oximetry_invalid, 0, 0xFF);
|
CHECK_VALUES(rec.oximetry_invalid, 0, 0xFF);
|
||||||
CHECK_VALUE(rec._unk, 0); // maybe vibration, given column label in CSV
|
CHECK_VALUES(rec.vibration, 0, 0x80); // 0x80 when vibration is triggered
|
||||||
if (rec.oximetry_invalid == 0xFF) {
|
if (rec.oximetry_invalid == 0xFF) {
|
||||||
CHECK_VALUE(rec.spo2, 0xFF);
|
CHECK_VALUE(rec.spo2, 0xFF);
|
||||||
CHECK_VALUE(rec.hr, 0xFF);
|
CHECK_VALUE(rec.hr, 0xFF);
|
||||||
@ -375,7 +375,7 @@ QList<ViatomFile::Record> ViatomFile::ReadData()
|
|||||||
|| a.hr != b.hr
|
|| a.hr != b.hr
|
||||||
|| a.oximetry_invalid != b.oximetry_invalid
|
|| a.oximetry_invalid != b.oximetry_invalid
|
||||||
|| a.motion != b.motion
|
|| a.motion != b.motion
|
||||||
|| a._unk != b._unk) {
|
|| a.vibration != b.vibration) {
|
||||||
all_are_duplicated = false;
|
all_are_duplicated = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ public:
|
|||||||
unsigned char hr;
|
unsigned char hr;
|
||||||
unsigned char oximetry_invalid;
|
unsigned char oximetry_invalid;
|
||||||
unsigned char motion;
|
unsigned char motion;
|
||||||
unsigned char _unk;
|
unsigned char vibration;
|
||||||
};
|
};
|
||||||
ViatomFile(QFile & file);
|
ViatomFile(QFile & file);
|
||||||
~ViatomFile() = default;
|
~ViatomFile() = default;
|
||||||
|
Loading…
Reference in New Issue
Block a user