- Fix possible problem with rebuilding CPAP data
- Change re-import to look just at last day (full re-import will be re-added later)
- Improve detection of when a day needs to be rebuilt on re-import
- Improve some diagnostic messages
o Now compares all days, not just starting from last day imported
o Compares number of non-identical MaskOn/Off events with session count
o Hid most qDebug messages behind #define STR_EDF
o Added qWarning to open() and close() calls for improved diagnostics
o Fixed some copy() calls that were not working
file.open() checked everywhere except in loaders.
qWarning() message written to debug log, with error number and text.
We may want to exit OSCAR with a message in many situations, but that is not implemented yet.
Set number of debug logs to be kept for Release version to 4.
Daily page: total hours was elapsed time of all machines, including large blocks that are not CPAP. Now just MT_CPAP time.
Welcome page: Same problem with total hours reporting, and AHI was calculated as events/total hours instead of events/CPAP hours.
Statistics page: Same problems as on Welcome page -- total hours and index calculations. Changed to using total CPAP hours.
Evidently gcc doesn't recognize inline forward declaration, but clang does.
I wonder who is right?
This was previously addressed by adding an #include. Instead, this patch
adds a standalone forward declaration of the QXmlStreamReader/Writer classes.
This has been tested and verified to compile with gcc and clang.
This is transparent to the user and is recorded into a log directory within
the OSCAR_Data directory.
Also add log rotation so that these logs don't grow forever.
The only code change was to move XmlReplayEvent::s_factories into
a local static variable accessed by XmlReplayEvent::factories() to
ensure that it will be initialized before it is used.
Otherwise there is no guarantee in C++11 that global variables
in different source files (translation units) will be initialized
in any particular order.
This is significant now because it will allow accurate recording of
multiple simultaneous connections.
This is important for the future because it establishes the
necessary infrastructure for recording downloaded sessions into their
own files so that they can be saved as backups.
Now a replayed read() will return the response that follows the
matching write().
When calls are made in the same order as they were during recording,
this will have no effect, and the original ordering will be replayed.
However, minor changes to the code should still result in sensible
replay until a new recording can be made.
Calling openConnection will return an open connection or nullptr.
Deleting the connection will close it.
SerialPort now uses this under the hood, while still presenting
the QSerialPort-compatible interface.