Commit Graph

229 Commits

Author SHA1 Message Date
sawinglogz
21f61d7527 Add Flex mode setting for DreamStation 200X-700X machines. 2019-09-20 15:38:14 -04:00
sawinglogz
3c1a7adaa3 Add support for many DreamStation settings, changes to flex mode require rebuilding all PRS1 databases. 2019-09-20 12:59:14 -04:00
sawinglogz
76a71802ab Rename some internal PRS1 parsing enums to match report terminology.
This affects parser YAML output, but has no effect on imported data.
2019-09-20 00:15:40 -04:00
sawinglogz
adc887c5f8 Import additional DreamStation settings:
- hose diameter
- auto on
- auto off
- mask resist lock (parsed only)
- show optional screens (parsed only)
2019-09-19 21:29:33 -04:00
sawinglogz
ccfce7fd2e Add internal parsing (and YAML output) for known DreamStation events that won't get imported.
These are events that are in the PRS1 files but which OSCAR doesn't know how to present:

- An F0V6 event with duration that looks like PB or LL but doesn't appear on any official reports
- The Auto-CPAP pressure to use at the beginning of a session
- A report of the snores detected at each pressure/EPAP/IPAP
- Apnea alarms on F3V6

Rather than bury the understanding in commented-out sections of the parser, these events
will now be parsed and added to the internal event stream, which allows them to be dumped
to YAML. Whenever OSCAR eventually supports these data, the importer will have ready
access to them.

Again, no change to external behavior.
2019-09-19 16:43:24 -04:00
sawinglogz
95e2baad26 Distinguish between pressure adjustment events and average pressure stats on PRS1.
This only affects the parser at this point, and the importer has been updated so that
there is no externally visible change to the imported data.

Eventually we'll need to figure out how to display the two differing kinds of
pressures, at which point we'll need to fix the importer to use the right channels,
instead of the inconsistent treatment now.
2019-09-19 14:21:12 -04:00
sawinglogz
5e4a24b237 Add support for F3V6 sessions without ramp, with apnea alarm. 2019-09-19 10:33:23 -04:00
Seeker4
d990ce560a Report pressure when IPAP is missing. This is a preliminary change and will be improved later. 2019-09-16 12:05:47 -07:00
Seeker4
dcf68dac37 Improve diagnostics messages and yet another check for the phantom date 2019-09-16 12:01:30 -07:00
Seeker4
1548a215f6 Document schema better, remove unused definitions 2019-09-16 12:00:14 -07:00
Seeker4
aaf5627891 Ignore zero-length files and add qWarning messages for ignored files. 2019-09-16 11:53:27 -07:00
sawinglogz
45018f4903 Update PRS1 loader from 500G110 test data. 2019-09-07 15:02:16 -04:00
Seeker4
aeffae09fc Standard and Advanced graphs apparently working, still with lots of diagnostics. 2019-09-01 22:14:36 -07:00
Seeker4
afdcd0bbc4 First step in Daily graphs rework: replace many hard-coded strings as STR_GRAPH_* variables for keys to graphs. 2019-08-31 17:56:53 -07:00
Seeker4
ff37ac0695 Add preferences setting to include machine serial on Statistics page machine settings report, default to off because it is ugly. 2019-08-31 17:06:47 -07:00
Phil Olynyk
efad208143 Adjust epcoh for time zone offset 2019-08-30 14:48:03 -04:00
sawinglogz
6b86eb1b11 Fix minor regression for PRS1 F3V6 mode import. 2019-08-28 21:53:50 -04:00
sawinglogz
febf3d2f5b Split PRS1 device mode parsing from imported modes.
This allows the parsing to accurately represent the data, even for modes that
OSCAR doesn't yet support.
2019-08-28 21:30:25 -04:00
sawinglogz
42f0745666 Improve settings interpretation for F3V6, though still not exactly right.
The next step will be to split parsing from mode interpretation, so that
we can at least accurately identify all of PRS1's modes. Then we can
work on mapping that to OSCAR's notion of modes, which probably then needs
to be augmented.
2019-08-20 12:48:15 -04:00
sawinglogz
ecb71e5706 Calculate PRS1 F3V6 pressure support settings, since we currently display them. 2019-08-20 12:08:24 -04:00
sawinglogz
0c816c7d4c Avoid pos++ in PRS1 DreamStation parsers to that events can be issued independently of parsing order. 2019-08-20 11:38:55 -04:00
sawinglogz
6c85195b39 Remove unused variable that clang missed. 2019-08-19 12:23:45 -04:00
sawinglogz
31fc47a5c5 Remove "series" from display in UI and on reports. 2019-08-18 17:27:21 -04:00
sawinglogz
928e50fcc1 Use actual product names for PRS1 instead of mangled approximations. 2019-08-18 17:03:52 -04:00
sawinglogz
66d9340cbb Don't mangle the model name for ResMed machines. 2019-08-18 16:56:41 -04:00
sawinglogz
84b900ca90 Remove the m_machopened flag from Profile, which caused newly created profiles
to act differently from profiles after a subsequent application launch.

It was only getting set at the end of Profile::OpenMachines, which was only
called by the Profile constructor, and which wouldn't succeed on a newly created
profile, having no files to open. Therefore, the only way for the flag to be set
was to quit and re-launch the application after creating the profile.

The flag's only remaining use was to make sure that OpenMachines() wasn't
getting called twice and trampling an existing list of machines, so the check
there was changed from looking at a brittle flag to looking at the actual list
of machines.

A critical warning was also added to the check, since OpenMachines() is
only getting called from the Profile constructor and therefore can't
be invoked twice unless a new bug has been introduced.
2019-08-15 16:56:44 -04:00
sawinglogz
e3e67438ea Fix the incomplete cleanup in Profile::UnloadMachineData that was resulting in
duplicate sessions being added when making preference changes to a brand new
profile with existing data.

Preference changes trigger a reload, see PreferencesDialog::Save and
needs_reload, leading to MainWindow::reloadProfile -> MainWindow::CloseProfile
-> Profile::UnloadMachineData.

This is the root cause of the duplicate sessions, but the fact that it only
happened with newly created profiles, rather than on subsequent launches,
demonstrates an inconsistency in state of Profile. It should be identical when
initially created and when loaded via subsequent application launch.
2019-08-15 16:28:07 -04:00
sawinglogz
6f7a49f949 Add a critical warning and skip when attempting to add a duplicate session to a Machine object.
This prevents duplicate sessions from being added to Day during a rebuild, but is still not
the root cause. The next step will be to address the attempted duplication in Machine.
2019-08-15 16:18:23 -04:00
sawinglogz
7d72f71fb4 Add a critical warning when a duplicate session is added to a Day object.
This is one step closer to the root cause of the crash, in which duplicate
sessions were being created during a rebuild.
2019-08-15 16:14:54 -04:00
sawinglogz
6d735a5733 Add Day::removeMachine to detect and clean up dangling references rather than
crashing when rebuilding data.

This doesn't yet address the root cause, but it will prevent crashing if other
similar bugs exist.
2019-08-15 15:49:40 -04:00
sawinglogz
0b8f89036a Merge branch 'master' into prs1-f0v6 2019-08-14 09:15:39 -04:00
sawinglogz
675f6d4361 Resolve remaining F0V6 event 3 debug messages in sample data. 2019-08-13 23:03:20 -04:00
sawinglogz
cc80a3ef09 Remove F0V6 logic from PRS1DataChunk::ParseEventsF0V234, no functional change. 2019-08-13 21:09:55 -04:00
sawinglogz
3eee72390e Clean up PRS1DataChunk::ParseEventsF0V6, no change in functionality. 2019-08-13 17:29:05 -04:00
sawinglogz
73dfdac81b Add debug logging for PRS1 F0V6 event 3. 2019-08-12 21:51:37 -04:00
Seeker4
e315baf6df Test builds use settings key of oscar-test, branch builds oscar-branch, and release builds just oscar. Default data directory named similarly. 2019-08-12 16:02:53 -07:00
sawinglogz
3de32dd21b Fix F0V6 PB starting time, and probably LL and PS as well. 2019-08-12 17:20:25 -04:00
sawinglogz
946293b67d Split PRS1Import::ParseF0Events into ParseEventsF0V6, no changes yet. 2019-08-12 16:58:27 -04:00
Seeker4
a08798cda2 Merge branch 'master' into dateformat 2019-08-08 16:26:02 -07:00
Seeker4
ceba1e81eb Make date in calendar on Daily page format per regional settings. 2019-08-08 16:24:30 -07:00
harre
77ccd417a3 Fix deprecated-copy errors and made deprecated-declarations just a warning 2019-08-06 23:49:51 +02:00
sawinglogz
d99e397cb3 Update PRS1 parser for 500X, 600X, and 700X events. 2019-08-06 15:47:36 -05:00
Seeker4
5cf6e14816 Fix problems resulting in compiler warning messages 2019-08-06 12:33:48 -07:00
Seeker4
75c0a9950a Format dates per national settings. 2019-08-06 10:51:14 -07:00
sawinglogz
7dd891df31 Add more F0V6 events based on remaining 400X sample data. 2019-08-05 21:37:19 -05:00
sawinglogz
64309f366a Add PRS1 model 562P to list of tested machines. 2019-08-05 20:46:05 -05:00
sawinglogz
84f1389d51 Support more F0V6 events based on all sessions from a single 400X machine. 2019-08-05 15:22:22 -05:00
sawinglogz
4e863ba484 Add first confirmed F0V6 events from sample data. 2019-08-04 21:09:42 -05:00
sawinglogz
e0d4872f6b Create placeholder event parser for PRS1 F0V6, separate from other F0 machines. 2019-08-04 19:36:40 -05:00
Phil Olynyk
f7227b7316 Don't create (summary) sessions when maskon == maskoff 2019-08-01 13:30:11 -04:00