mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-19 04:00:45 +00:00
CMS50i PI test3
This commit is contained in:
parent
9c9408a4f2
commit
809779af27
@ -454,26 +454,19 @@ void CMS50F37Loader::processBytes(QByteArray bytes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (res == 0x09) {
|
if (res == 0x09) {
|
||||||
quint8 * buf = &((quint8 *)buffer.data())[idx];
|
|
||||||
// 9,80,e1,c4,ce,82 // cms50i data
|
// 9,80,e1,c4,ce,82 // cms50i data
|
||||||
for (int i = 3, msb = buf[1]; i < len-1; i++, msb>>= 1) {
|
|
||||||
|
quint8 * buf = &((quint8 *)buffer.data())[idx];
|
||||||
|
for (int i = 3, msb = buf[1]; i < len-2; i++, msb>>= 1) {
|
||||||
buf[i] = (buf[i] & 0x7f) | (msb & 0x01 ? 0x80 : 0);
|
buf[i] = (buf[i] & 0x7f) | (msb & 0x01 ? 0x80 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
quint16 pi1 = buf[idx + 4] | buf[idx + 5] << 8;
|
quint16 pi = buffer.at(idx + 4) | (buffer.at(idx + 5) << 8);
|
||||||
quint16 pi2 = buf[idx + 4] | ((char *)buf)[idx + 5] << 8;
|
|
||||||
quint16 pi3 = buf[idx + 4] | buf[idx + 5] << 7;
|
|
||||||
quint16 pi4 = buf[idx + 4] | ((char *)buf)[idx + 5] << 7;
|
|
||||||
|
|
||||||
qDebug() << "Pi1 =" << pi1
|
|
||||||
<< "Pi2 =" << pi2
|
|
||||||
<< "Pi3 =" << pi3
|
|
||||||
<< "Pi4 =" << pi4;
|
|
||||||
|
|
||||||
pulse = buf[3];
|
pulse = buf[3];
|
||||||
quint8 spo2 = buf[2];
|
quint8 spo2 = buf[2];
|
||||||
|
|
||||||
oxirec->append(((spo2 == 0) || (pulse == 0)) ? OxiRecord(0,0,0) : OxiRecord(pulse, spo2, pi3));
|
oxirec->append(((spo2 == 0) || (pulse == 0)) ? OxiRecord(0,0,0) : OxiRecord(pulse, spo2, pi));
|
||||||
} else if (res == 0x0f) {
|
} else if (res == 0x0f) {
|
||||||
// f,80,de,c2,de,c2,de,c2 cms50F data...
|
// f,80,de,c2,de,c2,de,c2 cms50F data...
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user