Update to use SleepLib's edfParser

This commit is contained in:
Phil Olynyk 2021-06-24 12:13:21 -04:00
parent 7f6128fe24
commit 5323a56186
2 changed files with 11 additions and 4 deletions

View File

@ -12,6 +12,8 @@ CONFIG -= debug_and_release
QT += core widgets QT += core widgets
DEFINES+=DUMPSTR
TARGET = anotDump TARGET = anotDump
TEMPLATE = app TEMPLATE = app
@ -27,6 +29,6 @@ SOURCES += \
dumpSTR/edfparser.cpp \ dumpSTR/edfparser.cpp \
HEADERS += \ HEADERS += \
dumpSTR/common.h \ dumpSTR/SleepLib/common.h \
dumpSTR/edfparser.h \ dumpSTR/edfparser.h \

View File

@ -81,9 +81,14 @@ int main(int argc, char *argv[]) {
} }
EDFInfo edf; EDFInfo edf;
QByteArray * buffer = edf.Open(filename); if ( ! edf.Open(filename) ) {
if ( ! edf.Parse(buffer) ) qDebug() << "Failed to open" << filename;
exit(-1); exit(-1);
}
if ( ! edf.Parse() ) {
qDebug() << "Parsing failed on" << filename;
exit(-1);
}
QDate d2 = edf.edfHdr.startdate_orig.date(); QDate d2 = edf.edfHdr.startdate_orig.date();
if (d2.year() < 2000) { if (d2.year() < 2000) {