mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 04:00:44 +00:00
Merge branch 'master' of gitlab.com:sleepyhead/sleepyhead-code
This commit is contained in:
commit
b288e2bb9d
@ -866,6 +866,16 @@ bool PRS1Import::ParseF5Events()
|
||||
// }
|
||||
// Code[2]->AddEvent(t,data0);
|
||||
break;
|
||||
case 0x03: // BIPAP Pressure
|
||||
qDebug() << "0x03 Observed in ASV data!!????";
|
||||
|
||||
data0 = buffer[pos++];
|
||||
data1 = buffer[pos++];
|
||||
// data0/=10.0;
|
||||
// data1/=10.0;
|
||||
// session->AddEvent(new Event(t,CPAP_EAP, 0, data, 1));
|
||||
// session->AddEvent(new Event(t,CPAP_IAP, 0, &data1, 1));
|
||||
break;
|
||||
|
||||
case 0x04: // Timed Breath
|
||||
data0 = buffer[pos++];
|
||||
@ -898,16 +908,20 @@ bool PRS1Import::ParseF5Events()
|
||||
case 0x08: // ???
|
||||
data0 = buffer[pos++];
|
||||
tt -= qint64(data0) * 1000L; // Subtract Time Offset
|
||||
qDebug() << "Code 8 found at " << hex << pos - 1 << " " << tt;
|
||||
//qDebug() << "Code 8 found at " << hex << pos - 1 << " " << tt;
|
||||
|
||||
if (!Code[10]) {
|
||||
if (!(Code[10] = session->AddEventList(cpapcode, EVL_Event))) { return false; }
|
||||
if (event->familyVersion>=2) {
|
||||
HY->AddEvent(tt, data0);
|
||||
} else {
|
||||
if (!Code[10]) {
|
||||
if (!(Code[10] = session->AddEventList(cpapcode, EVL_Event))) { return false; }
|
||||
}
|
||||
|
||||
//????
|
||||
//data1=buffer[pos++]; // ???
|
||||
Code[10]->AddEvent(tt, data0);
|
||||
//pos++;
|
||||
}
|
||||
|
||||
//????
|
||||
//data1=buffer[pos++]; // ???
|
||||
Code[10]->AddEvent(tt, data0);
|
||||
pos++;
|
||||
break;
|
||||
|
||||
case 0x09: // ASV Codes
|
||||
@ -922,12 +936,15 @@ bool PRS1Import::ParseF5Events()
|
||||
case 0x0a:
|
||||
data0 = buffer[pos++];
|
||||
tt -= qint64(data0) * 1000L; // Subtract Time Offset
|
||||
if (event->familyVersion>=2) {
|
||||
FL->AddEvent(tt, data0);
|
||||
} else {
|
||||
if (!Code[7]) {
|
||||
if (!(Code[7] = session->AddEventList(cpapcode, EVL_Event))) { return false; }
|
||||
}
|
||||
|
||||
if (!Code[7]) {
|
||||
if (!(Code[7] = session->AddEventList(cpapcode, EVL_Event))) { return false; }
|
||||
Code[7]->AddEvent(tt, data0);
|
||||
}
|
||||
|
||||
Code[7]->AddEvent(tt, data0);
|
||||
break;
|
||||
|
||||
|
||||
@ -951,16 +968,36 @@ bool PRS1Import::ParseF5Events()
|
||||
break;
|
||||
|
||||
case 0x0c:
|
||||
data0 = buffer[pos++];
|
||||
tt -= qint64(data0) * 1000L; // Subtract Time Offset
|
||||
qDebug() << "Code 12 found at " << hex << pos - 1 << " " << tt;
|
||||
|
||||
if (!Code[8]) {
|
||||
if (!(Code[8] = session->AddEventList(cpapcode, EVL_Event))) { return false; }
|
||||
if (event->familyVersion>=2) {
|
||||
data0 = (buffer[pos + 1] << 8 | buffer[pos]);
|
||||
data0 *= 2;
|
||||
pos += 2;
|
||||
data1 = buffer[pos++];
|
||||
tt = t - qint64(data1) * 1000L;
|
||||
|
||||
if (!PB) {
|
||||
if (!(PB = session->AddEventList(cpapcode, EVL_Event))) {
|
||||
qDebug() << "!PB addeventlist exit";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
PB->AddEvent(tt, data0);
|
||||
|
||||
} else {
|
||||
data0 = buffer[pos++];
|
||||
tt -= qint64(data0) * 1000L; // Subtract Time Offset
|
||||
qDebug() << "Code 12 found at " << hex << pos - 1 << " " << tt;
|
||||
|
||||
|
||||
if (!Code[8]) {
|
||||
if (!(Code[8] = session->AddEventList(cpapcode, EVL_Event))) { return false; }
|
||||
}
|
||||
|
||||
Code[8]->AddEvent(tt, data0);
|
||||
pos += 2;
|
||||
}
|
||||
|
||||
Code[8]->AddEvent(tt, data0);
|
||||
pos += 2;
|
||||
break;
|
||||
|
||||
case 0x0d: // All the other ASV graph stuff.
|
||||
@ -1002,34 +1039,53 @@ bool PRS1Import::ParseF5Events()
|
||||
PS->AddEvent(t, data2); // Pressure Support
|
||||
if (event->familyVersion >= 1) {
|
||||
data0 = buffer[pos++];
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case 0x03: // BIPAP Pressure
|
||||
qDebug() << "0x03 Observed in ASV data!!????";
|
||||
|
||||
data0 = buffer[pos++];
|
||||
data1 = buffer[pos++];
|
||||
// data0/=10.0;
|
||||
// data1/=10.0;
|
||||
// session->AddEvent(new Event(t,CPAP_EAP, 0, data, 1));
|
||||
// session->AddEvent(new Event(t,CPAP_IAP, 0, &data1, 1));
|
||||
break;
|
||||
|
||||
case 0x11: // Not Leak Rate
|
||||
qDebug() << "0x11 Observed in ASV data!!????";
|
||||
//if (!Code[24]) {
|
||||
// Code[24]=new EventList(cpapcode,EVL_Event);
|
||||
//}
|
||||
//Code[24]->AddEvent(t,buffer[pos++]);
|
||||
break;
|
||||
|
||||
case 0x0e: // Unknown
|
||||
qDebug() << "0x0E Observed in ASV data!!????";
|
||||
data0 = buffer[pos++]; // << 8) | buffer[pos];
|
||||
// Family 5.2 has this code
|
||||
if (event->familyVersion>=2) {
|
||||
EPAP->AddEvent(t, data0=buffer[pos+9]); // 9
|
||||
IPAP->AddEvent(t, data1=buffer[pos+0]); // 0
|
||||
IPAPLo->AddEvent(t, buffer[pos+1]); // 1
|
||||
IPAPHi->AddEvent(t, buffer[pos+2]); // 2
|
||||
LEAK->AddEvent(t, buffer[pos+3]); // 3
|
||||
TV->AddEvent(t, buffer[pos+7]); // 7
|
||||
RR->AddEvent(t, buffer[pos+4]); // 4
|
||||
PTB->AddEvent(t, buffer[pos+5]); // 5
|
||||
MV->AddEvent(t, buffer[pos+6]); //6
|
||||
SNORE->AddEvent(t, data2 = buffer[pos+8]); //??
|
||||
|
||||
if (data2 > 0) {
|
||||
if (!VS) {
|
||||
if (!(VS = session->AddEventList(CPAP_VSnore, EVL_Event))) {
|
||||
qDebug() << "!VS eventlist exit";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
VS->AddEvent(t, 0); //data2); // VSnore
|
||||
}
|
||||
data2 = data1 - data0;
|
||||
PS->AddEvent(t, data2); // Pressure Support
|
||||
pos+=11;
|
||||
} else {
|
||||
qDebug() << "0x0E Observed in ASV data!!????";
|
||||
data0 = buffer[pos++]; // << 8) | buffer[pos];
|
||||
|
||||
}
|
||||
//session->AddEvent(new Event(t,cpapcode, 0, data, 1));
|
||||
break;
|
||||
case 0x0f:
|
||||
qDebug() << "0x0f Observed in ASV data!!????";
|
||||
|
||||
data0 = buffer[pos + 1] << 8 | buffer[pos];
|
||||
pos += 2;
|
||||
data1 = buffer[pos]; //|buffer[pos+1] << 8
|
||||
pos += 1;
|
||||
tt -= qint64(data1) * 1000L;
|
||||
//session->AddEvent(new Event(tt,cpapcode, 0, data, 2));
|
||||
break;
|
||||
|
||||
case 0x10: // Unknown
|
||||
data0 = buffer[pos + 1] << 8 | buffer[pos];
|
||||
@ -1045,18 +1101,15 @@ bool PRS1Import::ParseF5Events()
|
||||
// data2 = buffer[pos++];
|
||||
//session->AddEvent(new Event(t,cpapcode, 0, data, 3));
|
||||
break;
|
||||
|
||||
case 0x0f:
|
||||
qDebug() << "0x0f Observed in ASV data!!????";
|
||||
|
||||
data0 = buffer[pos + 1] << 8 | buffer[pos];
|
||||
pos += 2;
|
||||
data1 = buffer[pos]; //|buffer[pos+1] << 8
|
||||
pos += 1;
|
||||
tt -= qint64(data1) * 1000L;
|
||||
//session->AddEvent(new Event(tt,cpapcode, 0, data, 2));
|
||||
case 0x11: // Not Leak Rate
|
||||
qDebug() << "0x11 Observed in ASV data!!????";
|
||||
//if (!Code[24]) {
|
||||
// Code[24]=new EventList(cpapcode,EVL_Event);
|
||||
//}
|
||||
//Code[24]->AddEvent(t,buffer[pos++]);
|
||||
break;
|
||||
|
||||
|
||||
case 0x12: // Summary
|
||||
qDebug() << "0x12 Observed in ASV data!!????";
|
||||
data0 = buffer[pos++];
|
||||
|
@ -1 +1 @@
|
||||
const int build_number = 1;
|
||||
const int build_number = 2;
|
||||
|
@ -1,4 +1,20 @@
|
||||
<!DOCTYPE ChangeLog>
|
||||
<b>Changes and fixes in v1.0.0-beta-2</b>
|
||||
<version number="1.0.0-beta-2">
|
||||
<list>
|
||||
<li>[PR S1/Dreamstation Importer] Periodic Breathing/CSR was not Doubling on F0V4 560 machines</li>
|
||||
<li>[Core Program] Fix program crash on changing language or profile</li>
|
||||
<li>[PR S1/Dreamstation Importer] Added PRS1 BiPAP AutoSV 960T F5V2 support</li>
|
||||
<li>[ResMed Importer] EPR erroneously shown as OFF instead of 3</li>
|
||||
<li>Redesign autoupdater so it parses Qt Installer Frameworks XML structures</li>
|
||||
<li>Reset Channel names on language change</li>
|
||||
<li>Improve Tooltip timeouts in preferences</li>
|
||||
<li>Fix some untranslateable strings and spelling mistakes</li>
|
||||
<li>Fix a couple of minor Time at Pressure chart/tooltip glitches</li>
|
||||
</list>
|
||||
</version>
|
||||
<br/>
|
||||
|
||||
<b>Changes and fixes in v1.0.0-beta-1</b>
|
||||
<version number="1.0.0-beta-1">
|
||||
<list>
|
||||
@ -7,6 +23,7 @@
|
||||
<li>Redid Unintentional Leaks calcluations using a simple Mask Profile in Preferences</li>
|
||||
<li>Make Release Notes welcome message translate-able (should the changelog be too?)</li>
|
||||
</list>
|
||||
</version>
|
||||
<br/>
|
||||
|
||||
<b>Changes and fixes in v1.0.0-beta-0</b>
|
||||
|
@ -85,25 +85,27 @@ void release_notes()
|
||||
QVBoxLayout * layout = new QVBoxLayout(&relnotes);
|
||||
QWebView * web = new QWebView(&relnotes);
|
||||
|
||||
QString welcomeMessage = "<font size=+1>"
|
||||
"<p>"+QObject::tr("After four years in the making, this build brings SleepyHead into the final beta phase.")+"</p>"
|
||||
"<p>"+QObject::tr("Things are not perfect yet, but the focus from now is putting on the finishing touches. ")+
|
||||
QObject::tr("This version brings support for the new Philips Respironics DreamStation, and older PRS1 1060P models.")+
|
||||
"</p></font>";
|
||||
|
||||
// QString welcomeMessage = "<font size=+1>"
|
||||
// "<p>"+QObject::tr("After four years in the making, this build brings SleepyHead into the final beta phase.")+"</p>"
|
||||
// "<p>"+QObject::tr("Things are not perfect yet, but the focus from now is putting on the finishing touches. ")+
|
||||
// QObject::tr("This version brings support for the new Philips Respironics DreamStation, and older PRS1 1060P models.")+
|
||||
// "</p></font>";
|
||||
;
|
||||
QFile clfile(":/docs/release_notes.html");
|
||||
QString changeLog = QObject::tr("Sorry, could not locate changelog.");
|
||||
if (clfile.open(QIODevice::ReadOnly)) {
|
||||
QTextStream ts(&clfile);
|
||||
//Todo, write XML parser and only show the latest..
|
||||
changeLog = ts.readAll();
|
||||
}
|
||||
|
||||
|
||||
QString html = "<html>"
|
||||
"<head><meta charset=\"UTF-8\"></head>"
|
||||
"<body>"
|
||||
"<h2><p>"+QObject::tr("Greetings!")+"</p></h2>";
|
||||
"<body>";
|
||||
//"<h2><p>"+QObject::tr("Greetings!")+"</p></h2>";
|
||||
|
||||
html += welcomeMessage;
|
||||
// html += welcomeMessage;
|
||||
|
||||
|
||||
if (ReleaseStatus != "r") {
|
||||
@ -111,8 +113,8 @@ void release_notes()
|
||||
"<font size=+1><i>"+QObject::tr("As this is a pre-release version, it is recommended that you back up your data folder manually before proceding, because attempting to roll back later may break things.")+"</i></font></p>";
|
||||
}
|
||||
|
||||
html += "<p><b>"+QObject::tr("Sleep Well, and good luck!")+"</b></p>"
|
||||
"<p><b><i>"+"JediMark"+"</i></b></p><br/><b><i>"+QObject::tr("Change log")+"</i></b><hr/><br/><br/>";
|
||||
// html += "<p><b>"+QObject::tr("Sleep Well, and good luck!")+"</b></p>"
|
||||
// "<p><b><i>"+"JediMark"+"</i></b></p><br/><b><i>"+QObject::tr("Change log")+"</i></b><hr/><br/><br/>";
|
||||
|
||||
html += changeLog;
|
||||
html += "</body></html>";
|
||||
|
@ -1 +1 @@
|
||||
1
|
||||
2
|
||||
|
Loading…
Reference in New Issue
Block a user