mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 18:50:44 +00:00
Comment out set but otherwise unused variables.
g++ warns about this, which we treat as an error.
This commit is contained in:
parent
4ba711396e
commit
39e243a36d
@ -118,15 +118,15 @@ Session* DreemLoader::readNextSession()
|
|||||||
Session* sess = nullptr;
|
Session* sess = nullptr;
|
||||||
|
|
||||||
QDateTime start_time, stop_time;
|
QDateTime start_time, stop_time;
|
||||||
int sleep_onset, sleep_duration;
|
int sleep_onset; //, sleep_duration;
|
||||||
int light_sleep_duration, deep_sleep_duration, rem_duration, awakened_duration;
|
int light_sleep_duration, deep_sleep_duration, rem_duration, awakened_duration;
|
||||||
int awakenings, position_changes; // average_hr, average_rr;
|
int awakenings; //, position_changes, average_hr, average_rr;
|
||||||
float sleep_efficiency;
|
float sleep_efficiency;
|
||||||
QStringList hypnogram;
|
QStringList hypnogram;
|
||||||
|
|
||||||
QHash<QString,QString> row;
|
QHash<QString,QString> row;
|
||||||
while (csv->readRow(row)) {
|
while (csv->readRow(row)) {
|
||||||
SessionID sid;
|
SessionID sid = 0;
|
||||||
invalid_fields = false;
|
invalid_fields = false;
|
||||||
|
|
||||||
start_time = readDateTime(row["Start Time"]);
|
start_time = readDateTime(row["Start Time"]);
|
||||||
@ -135,18 +135,18 @@ Session* DreemLoader::readNextSession()
|
|||||||
if (mach->SessionExists(sid)) {
|
if (mach->SessionExists(sid)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
} // else invalid_fields will be true
|
||||||
|
|
||||||
// "Type" always seems to be "night"
|
// "Type" always seems to be "night"
|
||||||
stop_time = readDateTime(row["Stop Time"]);
|
stop_time = readDateTime(row["Stop Time"]);
|
||||||
sleep_onset = readDuration(row["Sleep Onset Duration"]);
|
sleep_onset = readDuration(row["Sleep Onset Duration"]);
|
||||||
sleep_duration = readDuration(row["Sleep Duration"]);
|
//sleep_duration = readDuration(row["Sleep Duration"]);
|
||||||
light_sleep_duration = readDuration(row["Light Sleep Duration"]);
|
light_sleep_duration = readDuration(row["Light Sleep Duration"]);
|
||||||
deep_sleep_duration = readDuration(row["Deep Sleep Duration"]);
|
deep_sleep_duration = readDuration(row["Deep Sleep Duration"]);
|
||||||
rem_duration = readDuration(row["REM Duration"]);
|
rem_duration = readDuration(row["REM Duration"]);
|
||||||
awakened_duration = readDuration(row["Wake After Sleep Onset Duration"]);
|
awakened_duration = readDuration(row["Wake After Sleep Onset Duration"]);
|
||||||
awakenings = readInt(row["Number of awakenings"]);
|
awakenings = readInt(row["Number of awakenings"]);
|
||||||
position_changes = readInt(row["Position Changes"]);
|
//position_changes = readInt(row["Position Changes"]);
|
||||||
//average_hr = readInt(row["Mean Heart Rate"]); // TODO: sometimes "None"
|
//average_hr = readInt(row["Mean Heart Rate"]); // TODO: sometimes "None"
|
||||||
//average_rr = readInt(row["Mean Respiration CPM"]);
|
//average_rr = readInt(row["Mean Respiration CPM"]);
|
||||||
// "Number of Stimulations" is 0 for US models
|
// "Number of Stimulations" is 0 for US models
|
||||||
|
@ -157,20 +157,20 @@ Session* ZEOLoader::readNextSession()
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
Session* sess = nullptr;
|
Session* sess = nullptr;
|
||||||
QDateTime start_of_night, end_of_night, rise_time;
|
QDateTime start_of_night; //, end_of_night, rise_time;
|
||||||
SessionID sid;
|
|
||||||
|
|
||||||
qint64 st, tt;
|
qint64 st, tt;
|
||||||
int stage;
|
int stage;
|
||||||
|
|
||||||
int ZQ, TimeToZ, TimeInWake, TimeInREM, TimeInLight, TimeInDeep, Awakenings;
|
int ZQ, TimeToZ, TimeInWake, TimeInREM, TimeInLight, TimeInDeep, Awakenings;
|
||||||
int MorningFeel;
|
int MorningFeel;
|
||||||
QString FirmwareVersion, MyZeoVersion;
|
//QString FirmwareVersion, MyZeoVersion;
|
||||||
QDateTime FirstAlarmRing, LastAlarmRing, FirstSnoozeTime, LastSnoozeTime, SetAlarmTime;
|
//QDateTime FirstAlarmRing, LastAlarmRing, FirstSnoozeTime, LastSnoozeTime, SetAlarmTime;
|
||||||
QStringList SG, DSG;
|
QStringList /*SG,*/ DSG;
|
||||||
|
|
||||||
QHash<QString,QString> row;
|
QHash<QString,QString> row;
|
||||||
while (csv->readRow(row)) {
|
while (csv->readRow(row)) {
|
||||||
|
SessionID sid = 0;
|
||||||
invalid_fields = false;
|
invalid_fields = false;
|
||||||
|
|
||||||
start_of_night = readDateTime(row["Start of Night"]);
|
start_of_night = readDateTime(row["Start of Night"]);
|
||||||
@ -179,7 +179,7 @@ Session* ZEOLoader::readNextSession()
|
|||||||
if (mach->SessionExists(sid)) {
|
if (mach->SessionExists(sid)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
} // else invalid_fields will be true
|
||||||
|
|
||||||
ZQ = readInt(row["ZQ"]);
|
ZQ = readInt(row["ZQ"]);
|
||||||
TimeToZ = readInt(row["Time to Z"]);
|
TimeToZ = readInt(row["Time to Z"]);
|
||||||
@ -188,22 +188,22 @@ Session* ZEOLoader::readNextSession()
|
|||||||
TimeInLight = readInt(row["Time in Light"]);
|
TimeInLight = readInt(row["Time in Light"]);
|
||||||
TimeInDeep = readInt(row["Time in Deep"]);
|
TimeInDeep = readInt(row["Time in Deep"]);
|
||||||
Awakenings = readInt(row["Awakenings"]);
|
Awakenings = readInt(row["Awakenings"]);
|
||||||
end_of_night = readDateTime(row["End of Night"]);
|
//end_of_night = readDateTime(row["End of Night"]);
|
||||||
rise_time = readDateTime(row["Rise Time"]);
|
//rise_time = readDateTime(row["Rise Time"]);
|
||||||
FirstAlarmRing = readDateTime(row["First Alarm Ring"], false);
|
//FirstAlarmRing = readDateTime(row["First Alarm Ring"], false);
|
||||||
LastAlarmRing = readDateTime(row["Last Alarm Ring"], false);
|
//LastAlarmRing = readDateTime(row["Last Alarm Ring"], false);
|
||||||
FirstSnoozeTime = readDateTime(row["First Snooze Time"], false);
|
//FirstSnoozeTime = readDateTime(row["First Snooze Time"], false);
|
||||||
LastSnoozeTime = readDateTime(row["Last Snooze Time"], false);
|
//LastSnoozeTime = readDateTime(row["Last Snooze Time"], false);
|
||||||
SetAlarmTime = readDateTime(row["Set Alarm Time"], false);
|
//SetAlarmTime = readDateTime(row["Set Alarm Time"], false);
|
||||||
MorningFeel = readInt(row["Morning Feel"], false);
|
MorningFeel = readInt(row["Morning Feel"], false);
|
||||||
FirmwareVersion = row["Firmware Version"];
|
//FirmwareVersion = row["Firmware Version"];
|
||||||
MyZeoVersion = row["My ZEO Version"];
|
//MyZeoVersion = row["My ZEO Version"];
|
||||||
|
|
||||||
if (invalid_fields) {
|
if (invalid_fields) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
SG = row["Sleep Graph"].trimmed().split(" ");
|
//SG = row["Sleep Graph"].trimmed().split(" ");
|
||||||
DSG = row["Detailed Sleep Graph"].trimmed().split(" ");
|
DSG = row["Detailed Sleep Graph"].trimmed().split(" ");
|
||||||
|
|
||||||
if (DSG.size() == 0) {
|
if (DSG.size() == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user