Commit Graph

1202 Commits

Author SHA1 Message Date
sawinglogz
7b65a85c14 Add PRS1 pressure-set channels to CSV export. 2020-04-28 12:11:41 -04:00
sawinglogz
0680424759 Refactor CSV export slightly to make it easier to add new channels.
No functional change.
2020-04-28 12:06:45 -04:00
sawinglogz
a8cd0a72b4 Add support for AVAPS in overview pressure chart. 2020-04-27 20:18:05 -04:00
sawinglogz
4a5322c350 Fix overview pressure chart for PRS1 pressure setting channels. 2020-04-27 17:35:50 -04:00
sawinglogz
670693dd5f Move gPressureChart value calculation into addSlice. 2020-04-27 16:55:56 -04:00
sawinglogz
33eacab53f Refactor gPressureChart::populate(). 2020-04-27 16:46:25 -04:00
sawinglogz
c5768a64fe Simplify gPressureChart upper label formatting. 2020-04-27 16:07:15 -04:00
sawinglogz
d13109bbed Replace gPressureChart array indices with channel-based references. 2020-04-27 15:50:55 -04:00
sawinglogz
0ebf4e70a3 Clean up gPressureChart constructor, with minor refactoring. 2020-04-27 14:46:49 -04:00
sawinglogz
cfca378160 Move pressure chart class into its own files. 2020-04-27 14:12:16 -04:00
Phil Olynyk
16c2784915 Always read STR.edf file from BACKUP folder.
Use real date for STR files in STR_Backup folder, and
only keep the longest file if the dates are the same.
2020-04-26 20:59:23 -04:00
sawinglogz
75bfdf2142 Fix Viatom loader glitch that prevented saving older sessions in a folder. 2020-04-26 14:06:48 -04:00
sawinglogz
17e2ef0a12 Detect OpenGL crashes on Windows and automatically downgrade to the software engine. 2020-04-25 16:30:35 -04:00
sawinglogz
2ac43a4a79 Fix zipping on Windows. 2020-04-24 16:58:44 -04:00
sawinglogz
2b6cdccb16 Update unexpected data alerts for PRS1 500X110 based on new sample data. 2020-04-24 16:58:44 -04:00
sawinglogz
5f921a0fd1 Fix inverted logic on untested data message. 2020-04-24 16:58:44 -04:00
sawinglogz
0fa066db47 Fix (mask) pressure waveform scaling for PRS1 960T. 2020-04-22 17:14:59 -04:00
sawinglogz
40553fcf5e Add PRS1-specific "peak flow" channel used by pre-DreamStation ventilators. 2020-04-22 17:14:59 -04:00
sawinglogz
d41622443d Remove ramp time and pressure when PRS1 ramp is off for pre-DreamStation machines. 2020-04-22 17:14:59 -04:00
sawinglogz
59e4a3af68 Add icon for older C-Series PRS1 ventilators. 2020-04-22 17:14:58 -04:00
sawinglogz
f189b2f0e2 Clean up consistency checks during import of F3V0 and F3V3.
Import was working, but the consistency checks made a few assumptions
that turned out not to be universally applicable, so they were
making a lot of unnecessary noise.
2020-04-22 17:14:58 -04:00
sawinglogz
141988b6bf Add support for PRS1 F3V0.
Parsing is complete, import still needs review.

The only other functional change is parsing the Bi-Flex lock
setting that also applies F3V3.
2020-04-22 17:14:58 -04:00
sawinglogz
63c58ab3af Update unexpected data alerts for PRS1 F0V2 based on new sample 550P data. 2020-04-22 17:14:58 -04:00
sawinglogz
d09005352a Add support for rise time on DreamStation BiPAP machines (600X-700X).
Also add 600X150 and 700X150 to the list of tested machines, and
refine unexpected data warnings.
2020-04-22 17:14:58 -04:00
sawinglogz
191e0f89a8 Update Resmed regression tests to follow symlinks. 2020-04-19 14:25:32 -04:00
sawinglogz
0c0d616280 Bump VERSION to 1.1.1-alpha-0 after release of 1.1.0. 2020-04-19 14:25:14 -04:00
Phil Olynyk
c58509d655 Update VERSION to 1.1.0 for release 2020-04-17 10:07:08 -04:00
Phil Olynyk
ce053767f5 Update release-notes and some language names 2020-04-16 08:20:51 -04:00
sawinglogz
ea3da552aa Fix untranslated string in mainwindow. 2020-04-11 15:59:45 -04:00
sawinglogz
41fdcd0bd3 Fix pressure relief display in statistics page.
Also revert 691aafd as that change is no longer necessary with this fix.
2020-04-11 15:52:32 -04:00
Phil Olynyk
0d25d31049 Add ifdef around -Adding STR.edf information...- 2020-04-11 11:26:03 -04:00
Phil Olynyk
691aafda25 Change EPRLevel text back to xcmH2O so they show in Stats page 2020-04-11 11:01:24 -04:00
sawinglogz
3306c00b26 Fix minutes-at-pressure graph for PRS1 CPAP/BiPAP devices.
Also fix a drawing bug when there were spurious 0 pressures reported.
2020-04-10 16:49:23 -04:00
sawinglogz
5e2b51c6b9 Add support for PRS1 humidifier passover and error modes based on new data.
Also mark 500X180 as tested.
2020-04-10 16:48:28 -04:00
sawinglogz
7ffa345ae3 Bump version to rc-1.1 since we've already released rc-1.
Update this again when it's time to release rc-2 or final.
2020-04-10 16:47:30 -04:00
Phil Olynyk
040cfd2883 Version update to Release candidate 2020-04-09 10:04:42 -04:00
ArieKlerk
d90f7f4c94 Merge branch 'master' into translations 2020-04-07 19:49:58 +02:00
ArieKlerk
c824943f11 Here is the final set of release notes.
I will work on the credits and about now.
2020-04-07 19:44:14 +02:00
sawinglogz
3e2c1db19e Update PRS1 900X warnings based on new test data. 2020-04-05 17:19:15 -04:00
sawinglogz
f5bb5655e0 Enable the Daily tab/button after importing data from the Data menu.
Previously only oximetry data imported via the wizard would update
the button. (As would quitting/relaunching, or switching profiles.)
2020-04-04 17:37:19 -04:00
sawinglogz
244f18f2af Add support for newly discovered event in PRS1 F0V6, fixing total session time.
Also added 500X120 to list of tested machines.
2020-04-04 17:33:34 -04:00
Phil Olynyk
4cac0d1019 Update oscar.pro and Resources.qrc so build completes 2020-04-04 16:05:52 -04:00
ArieKlerk
0b664b8bda Here is my status quo for the moment. I did not pull before merge... 2020-04-04 21:54:22 +02:00
Phil Olynyk
a7c6ef18a4 make aboutdialog.cpp use Htmldocs, and clean up the html files 2020-04-04 14:41:45 -04:00
sawinglogz
3d908bf545 Update release notes with rc-1 designation for upcoming release. 2020-04-02 21:16:50 -04:00
sawinglogz
1591feb207 Reapply Arie's many grammatical fixes to the release notes. 2020-04-02 21:15:13 -04:00
sawinglogz
903482f5ac Revert the HTML Tidy mangling of release_notes.html that broke OSCAR rendering. 2020-04-02 20:56:30 -04:00
ArieKlerk
d4ae91e8fb These are the last changes *for now* The rest will be done when RC1 is out. 2020-04-02 21:13:07 +02:00
ArieKlerk
a7f6f9cc37 Merge branch 'master' into translations 2020-04-01 13:07:54 +02:00
Phil Olynyk
512a65c772 Change labels to use new LOOKUP behaviour 2020-03-30 20:38:22 -04:00
Phil Olynyk
13ba9aba48 Bad: lastpath is undef for not-Linux 2020-03-30 16:37:43 -04:00
sawinglogz
952b2e2fde Add latest fixes to release notes. 2020-03-30 12:08:05 -04:00
sawinglogz
5f2d4c206e More fixes to the welcome screen pressures.
PRS1 now seems correct across all modes.
2020-03-30 12:07:18 -04:00
ArieKlerk
f2e53d059a Merge branch 'master' into translations 2020-03-30 09:02:48 +02:00
sawinglogz
f2f9019d5c Fix pressure display on welcome page for PRS1 non-ventilators. 2020-03-29 21:50:19 -04:00
sawinglogz
217c71d1de Fix bar height on AHI and Usage charts in Overview when oximetry usage is longer than CPAP.
Thanks to spacewrench for identifying the issue and then tracking down the
offending code!
2020-03-29 19:21:34 -04:00
sawinglogz
7239923dbd Add improvements to beta-2 missing from the release notes. 2020-03-29 12:55:20 -04:00
sawinglogz
b59924cd86 Update release notes to be chronological. 2020-03-28 16:03:13 -04:00
ArieKlerk
bf198ab98f Merge branch 'master' into translations 2020-03-28 17:06:10 +01:00
ArieKlerk
9ab590448e Release changed from March to April 2020, and many small changes to translations-files. 2020-03-28 17:03:52 +01:00
sawinglogz
1e82500685 Minor update to PRS1 regression tests so that they can follow symlinks.
Also added comment about 900X clamping mask pressure at 15.875 cmH2O.
No functional changes.
2020-03-27 12:33:23 -04:00
sawinglogz
828d449aa4 Update summary cache so that purging oximetry persists between launches. 2020-03-26 19:59:54 -04:00
sawinglogz
47c97721fb Use platform-native fullscreen shortcut for Maximize Toggle.
Also fix annoying typo in mainwindow.ui.
2020-03-26 19:48:09 -04:00
sawinglogz
89e9e305fb Fix gcc warning in PRS1 loader. 2020-03-26 19:47:37 -04:00
sawinglogz
eef582e6a4 Merge branch 'master' into prs1-add-parsed-settings 2020-03-26 10:48:21 -04:00
sawinglogz
90434d5f11 Bump the PRS1 loader version to force a rebuild, update release notes.
Also fix a typo in the rebuild dialog.
2020-03-26 09:54:55 -04:00
sawinglogz
a96a665987 Rename PRS1_0E mystery channel to Variable Breathing based on forum discussion, disable it by default.
Also make TB an on-demand channel.
2020-03-26 09:01:28 -04:00
sawinglogz
f49ba51cb7 Improve PRS1 CPAP-Check and Auto-Trial setting import.
Also clean up PRS1 channels given the LOOKUP behavior, and clean
up ImportSummary now that native PRS1 modes are supported.
2020-03-25 21:14:25 -04:00
sawinglogz
3749a73fd1 Update channel LOOKUP data type to show unspecified options as integers. 2020-03-25 19:17:39 -04:00
sawinglogz
c271a64625 Improve import of F5V012 flex and rise time settings. 2020-03-25 17:02:32 -04:00
sawinglogz
6b581bc303 Fix AVAPS settings display. 2020-03-24 21:33:50 -04:00
sawinglogz
aae1ce28a6 Add specific AVAPS PRS1 modes and improve F3V3/F3V6 settings parsers.
In particular F3V3 won't always create IPAPmin/max settings when in
CPAP mode or with a single IPAP setting.

Also consider ventilators to have a flex mode of "Rise Time" when
they have a rise time configured.
2020-03-24 21:04:21 -04:00
sawinglogz
6a3c8c1a26 Add PRS1-specific mode channel, allowing correct display of S, S/T, and PC modes.
Also fix pressure settings for F3V3, and display of rise time and backup breath settings.
2020-03-24 17:15:29 -04:00
sawinglogz
d77ee5025a Comment out BrokenSummary and BrokenWaveform channels, as they are no longer used.
No functional change.
2020-03-24 13:50:30 -04:00
Phil Olynyk
ca78954471 Don't use mask on/off times to set session start and end
They will be updated according to the edf file times.
2020-03-24 10:34:50 -04:00
sawinglogz
389ddd1631 Import remaining parsed PRS1 settings: backup breath settings, tidal volume, rise time, EZ-Start, and Auto-Trial.
DreamStation ramp time and mask resistance "off" settings are now also imported.

Ventilator alarms are not yet parsed reliably enough to import at this time.
2020-03-23 21:09:55 -04:00
Phil Olynyk
1f4e989297 Merge branch 'master' into fix-series-names 2020-03-23 14:45:26 -04:00
Phil Olynyk
fd142ec40c Always include sthe series name in the model name -
Also ignore (for now) the new file type and signals of the 36039.
2020-03-23 14:41:31 -04:00
sawinglogz
77a34518bc Rename PRS1 mask resistance lock and setting channels for clarity. 2020-03-23 13:07:08 -04:00
sawinglogz
3eb2ad4a7b Import all remaining parsed PRS1 settings seen on bricks: flex lock, tubing type lock, mask resist lock, show AHI, and ramp type.
Also remove superfluous mask resist status.
2020-03-23 12:59:06 -04:00
sawinglogz
fb59597367 Clean up F3V3 breath rate range tests. No functional changes. 2020-03-23 11:45:10 -04:00
sawinglogz
5c9c140248 Update PRS1 settings range checks based on all test data. 2020-03-22 23:19:35 -04:00
sawinglogz
18fc074a45 Add all known PRS1 settings to the parsed event stream, in particular backup breath settings.
Also add more value and range checks for settings based on initial small
sample set. These will be dialed back once tested against all test data.
2020-03-22 20:00:09 -04:00
sawinglogz
84a2b5cfd1 Fix a crash when canceling a Zeo import.
Also apply the same fix to Dreem import.

Resolves #237.
2020-03-21 17:41:35 -04:00
sawinglogz
da0b4e0a1f Bump the version number so that we don't accidentally call future versions beta-2 any more. 2020-03-21 17:40:58 -04:00
Guy Scharf
844add8c92 Merge branch 'master' into version 2020-03-20 10:20:39 -07:00
Guy Scharf
0071a44f9e Correct version identification in Windows builds. 2020-03-20 10:17:28 -07:00
Phil Olynyk
eb2ef1cbb9 Move S9 to front of model name 2020-03-19 17:54:48 -04:00
Phil Olynyk
61c40a6702 Add /usr/local/share to resource pathlist 2020-03-15 16:27:36 -04:00
Phil Olynyk
a688f48f5d Allow linux standard paths for helper folders 2020-03-14 13:43:24 -04:00
Phil Olynyk
59dfb4fcf2 Change VERSION to 1.1.0-beta-2 2020-03-09 21:52:16 -04:00
Phil Olynyk
3617d2af09 Fix typo in CSR string 2020-03-09 21:15:02 -04:00
sawinglogz
bc62fce130 Refine PRS1 untested data warning based on new sample data. 2020-03-09 13:57:43 -04:00
sawinglogz
c92ef13e19 Add F0V2 variant of 451P to list of tested PRS1 machines. 2020-03-09 13:13:33 -04:00
sawinglogz
a9b16f26bd Add an error message to PRS1 loader. 2020-03-09 13:03:28 -04:00
sawinglogz
910be1f6af Move PRS1Loader::Open to use the new scanner.
Also update Detect to retain its original behavior of letting the user
select the P-Series folder instead of the root.

Also fix what looked like a hang when backing up PRS1 files. The
progress bar still doesn't update during backup, but at least it
now says that it's backing up and the UI remains responsive.
2020-03-09 12:47:54 -04:00
sawinglogz
0124cdbf1f Move PRS1 card detection and info presentation to the new scanner. 2020-03-09 11:17:59 -04:00
sawinglogz
485be366aa Make search for PRS1 "P-Series" folder truly case-insensitive. 2020-03-09 10:48:10 -04:00
sawinglogz
c8520c8449 Move PRS1 test card scanning into PRS1Loader.
Also reverse the chronological order of tests to provide the most complete output.

The loader itself doesn't yet use the new machine scanner.
2020-03-09 10:28:34 -04:00
sawinglogz
53525a7949 Refactor PRS1 test card scanning in preparation for unifying with loader.
This splits out scanning the directories from processing them, which
also allows for sorting.
2020-03-08 20:58:36 -04:00
sawinglogz
d4fd330a31 Fix regression introduced by cb57643.
The Test1/2 channels were no longer initialized. As a result, all
Test1/2 data got merged into channel 0.
2020-03-08 16:27:18 -04:00
Phil Olynyk
aaaaef0d41 Minor updates to the doc files 2020-03-04 15:23:22 -05:00
Phil Olynyk
f077353a01 Kludge fix for missing Ti and Te segments 2020-03-03 16:47:55 -05:00
Phil Olynyk
11b1d9a045 Roll the VAuto TrigCycEvent into the S0 VPAP-S RespEvent type 2020-02-21 21:41:00 -05:00
Phil Olynyk
b4bbdd9a54 update dumpSTR to use the standard edfparser files 2020-02-21 11:29:00 -05:00
sawinglogz
a80134e7db Remove redefinition of nullptr that caused compilation errors under Qt 5.14.
Thanks to mjphyi for tracking this down!

gcc didn't provide very useful error messages, saying that
error: invalid conversion from ‘long int’ to ‘QDebug::Stream*’
was in qglobal.h.

But it really had to do with a few scattered #defines in OSCAR changing
nullptr to NULL (an int). Since OSCAR now requires C++11, and nullptr
is a keyword in C++11, these #defines can go.

Resolves issue #5.
2020-02-18 15:22:51 -05:00
Guy Scharf
03adef372c Merge branch 'master' into preferences 2020-02-17 16:22:31 -07:00
sawinglogz
7fddb47dbc Fix regression in e698879 that prevented detection of shift key on launch. 2020-02-17 17:26:00 -05:00
Guy Scharf
634a139b29 Merge branch 'master' into preferences 2020-02-17 15:25:44 -07:00
Guy Scharf
40644b859d Move engine settings from Appearance to General page in Preferences Dialog
Also changed layout on various pages so that spacing is not disturbed when stretching vertically
    This was an attempt to shrink total dialog height, but that is so far not successful.
2020-02-17 14:42:49 -07:00
sawinglogz
d75a2e9fca Fix debug message when skipping short sessions.
The session ID is not a date on all machines.
2020-02-17 11:04:48 -05:00
sawinglogz
e698879e17 Move graphic engine configuration before creation of QApplication.
Qt was emitting console warnings about attempts to change
Qt::AA_UseDesktopOpenGL after creating the QApplication.
2020-02-17 10:59:26 -05:00
sawinglogz
bba5f93795 Comment out unused slots in MainWindow. 2020-02-17 09:39:38 -05:00
Phil Olynyk
99de650018 Merge branch 'master' into sanity-check-STR-file 2020-02-16 21:42:09 -05:00
Phil Olynyk
c671e873a3 Make Open return error when sanity fails 2020-02-16 21:41:56 -05:00
Phil Olynyk
bd4918dc30 Remove version update from importCPAP 2020-02-16 21:33:01 -05:00
Phil Olynyk
3df1ba50df Merge branch 'master' into update-machine-db-version 2020-02-16 21:19:00 -05:00
Phil Olynyk
6fed69e71c Update database version in loader, not profiles 2020-02-16 21:12:54 -05:00
sawinglogz
498451df4a Fix Windows file dialog for loading Viatom files. 2020-02-16 21:02:30 -05:00
sawinglogz
b96f22bcd9 Fix double import progress window. 2020-02-16 20:12:25 -05:00
Phil Olynyk
a094aee728 Add sanity check for STR file 2020-02-14 15:18:25 -05:00
Phil Olynyk
1a258eae34 Update machine.info.version after upgrade re-import 2020-02-13 20:37:52 -05:00
sawinglogz
c5c6f779f7 Fix Zeo and Dreem loaders' mysteriously missing sessions.
This was the same issue seen in the Viatom loader, fixed at 5e07187,
and the same fix works here.
2020-02-13 14:31:32 -05:00
Guy Scharf
3886543c40 Make Windows build process work without GIT 2020-02-12 19:45:12 -07:00
sawinglogz
0ee827b294 Add Resmed-specific settings channels to YAML. 2020-02-10 23:48:23 -05:00
Phil Olynyk
014a9c7944 Merge master containing testing changes 2020-02-10 22:18:39 -05:00
sawinglogz
bd68525246 Turn off backups in Resmed regression tests. 2020-02-10 20:58:49 -05:00
sawinglogz
7701694b14 Add support for YAML output by Resmed loader for regression testing. 2020-02-10 16:04:03 -05:00
Phil Olynyk
d27f9232d4 Set timezone to localNoDST and set session->first & last and fix typo 2020-02-09 23:45:31 -05:00
Phil Olynyk
084cff026c code cleaup in edfparser 2020-02-09 23:42:31 -05:00
Phil Olynyk
7f3cda6893 Add some additional debug text for clarity 2020-02-09 23:41:35 -05:00
Phil Olynyk
81eee97ec1 Change pass-by-value to pass-by-ref in BackupSTR 2020-02-07 20:16:47 -05:00
Phil Olynyk
1148d1b69e Merge master and clean up Open code 2020-02-07 16:20:53 -05:00
Phil Olynyk
1b105c1588 Delete profile settings moved to profiles.cpp 2020-02-07 16:00:58 -05:00
sawinglogz
a497c0f317 Update Viatom loader based on newly observed O2Ring data in the header. 2020-02-07 13:54:28 -05:00
Guy Scharf
77e2975ab2 Rework update_gitinfo.bat
There was a strange interaction between git rev-parse and git diff-index when run in a batch file.
    Reworked to change the way rev-parse command was handled.
    Also added check to make sure git.exe was in the path.
2020-02-07 08:46:56 -07:00
Phil Olynyk
0afaec53b5 In Preferences, ask if ResMed when no machines; force ResMed prefs when yes. Also in ResMed loader 2020-02-06 21:34:04 -05:00
Phil Olynyk
58a7f3f13d add no-error=strict-aliasing for old compilers 2020-02-06 17:25:43 -05:00
Phil Olynyk
b178dba420 add timezone test for invalid datetimes 2020-02-06 17:17:08 -05:00
Guy Scharf
34c545bb48 Merge branch 'master' into deploy3 2020-02-06 12:00:47 -07:00
Guy Scharf
20495e4475 Third time's the charm -- fix "-plus" notation for Windows 2020-02-06 11:59:17 -07:00
Phil Olynyk
bd6dabd3e5 Add debugging for missing session info 2020-02-06 09:13:16 -05:00
sawinglogz
c83de24dec Update PRS1 loader based on peculiar EZ-Start sample data.
It doesn't do anything differently yet, but it won't alert the user
about untested data, now that we have a sample.
2020-02-04 12:26:42 -05:00
sawinglogz
f40428f9fe Identify previously unknown Viatom vibration field. 2020-02-03 15:37:37 -05:00
sawinglogz
cdeba58c5d Fix minor cleanup bugs in the Resmed regression tests that were causing crashes. 2020-02-03 11:43:13 -05:00
Guy Scharf
ef26ab5e46 Fix, again, the "-plus" notation in Windows build process. 2020-02-02 22:19:23 -07:00
Phil Olynyk
da29e35766 Merge master with tidy-edf-parser 2020-02-02 14:52:02 -05:00
Phil Olynyk
f903a26d11 Force use of systems Standard Time Zone by QDateTime 2020-02-02 14:29:23 -05:00
Guy Scharf
2a03ff6c57 Fix "-pluis" notation on Windows builds 2020-02-01 19:07:47 -07:00
sawinglogz
39e243a36d Comment out set but otherwise unused variables.
g++ warns about this, which we treat as an error.
2020-01-31 17:18:01 -05:00
sawinglogz
e0b50a5680 Improve purging UI for oximeters.
The imported data doesn't list a brand, so the UI needs to fall back
on the loader name. Also, the purge menu wasn't getting updated
after an oximetry import.
2020-01-31 15:35:36 -05:00
sawinglogz
ea66563521 Allow purging of any machine, not just CPAP.
Otherwise there was no way to purge and re-import Somnopose or
hypnogram data, nor oximetry apart from one day at a time.
2020-01-31 15:16:31 -05:00
sawinglogz
a585b6dcfe Refactor PopulatePurgeMenu in advance of supporting more machines. 2020-01-31 14:35:15 -05:00
sawinglogz
ad9ac16f80 Add support for discontinuous hyponogram data in ZEO loader.
Also support sleep stage 6 ("Deep (2)") and adjust scale of chart
so that deep sleep is more visible.

And adjust scale of Dreem chart to match.
2020-01-31 13:31:49 -05:00
sawinglogz
492908f538 Add support for discontinuous hyponogram data in Dreem loader. 2020-01-31 12:44:41 -05:00
Phil Olynyk
6624738f67 Clean up EDFInfo class to avoid memory leaks 2020-01-30 19:54:53 -05:00
Phil Olynyk
0fd25f2f4e Add delete (obj) to clean up memory leaks 2020-01-30 19:52:37 -05:00
sawinglogz
ab9d5e87c5 Flip the sleep stage data to negative so that the chart is drawn in the right orientation.
Ideally graphs would be able to invert their Y axis without this hack, but
it works for now. It would also be good to support non-numeric labels
in the graph legend.
2020-01-30 13:45:55 -05:00
sawinglogz
62880d1a00 Comment and whitespace cleanup in Dreem, Viatom, and Zeo loaders. 2020-01-30 13:17:51 -05:00
sawinglogz
156215b729 Clean up Zeo loader using techniques from the Dreem loader.
Also speed up skipping previously imported sessions by bailing
earlier. No other change in functionality.
2020-01-30 12:25:35 -05:00
sawinglogz
32ffcc4f94 First pass at Dreem CSV loader.
Something's not quite right about the hypnogram timestamps, since
there are more than would fit within the start/stop times.
2020-01-29 20:00:33 -05:00
sawinglogz
f33dd654f8 Add generic CSV reader class and switch ZEO loader to it.
No change in functionality for ZEO files.

Resolves crashing (assertion failure) on non-ZEO CSV files.
2020-01-29 17:05:03 -05:00
sawinglogz
8ef068af7e Fix ZEO loader to handle MyZeo 0.3.1 date formatting.
Also make the UI more informative and fix up the regression test output.
2020-01-29 16:21:42 -05:00
sawinglogz
448bfa048c Refactor ZEO loader to allow for testing, add regression tests. 2020-01-29 15:47:11 -05:00
sawinglogz
b82d5dc971 Fix memory leak in PRS1 loader. 2020-01-29 10:43:58 -05:00
sawinglogz
cb576437ab Clean up noise and memory leaks in unit tests. 2020-01-29 09:10:29 -05:00
sawinglogz
077f51178f Split PRS1 oximetry data so that invalid samples show up as gaps on the charts. 2020-01-28 17:36:02 -05:00
sawinglogz
15e6f1eadf Refactor PRS1 oximetry import to prepare for discontinuous data.
Also remove some return values that were unused.
2020-01-28 16:04:34 -05:00
sawinglogz
0358386cd3 Fix PRS1 tube diameter display.
It was being parsed correctly, but the mapping to display was wrong.
2020-01-28 14:07:58 -05:00
sawinglogz
ba81370fb6 Update PRS1 warnings based on new sample data, add 500X130 to list of tested madels. 2020-01-28 13:19:45 -05:00
sawinglogz
5fedd8349a Fix Bi-Flex labeling for PRS1 DreamStation 600X and 700X machines. 2020-01-28 12:02:03 -05:00
sawinglogz
c6169da7e0 Fix regression in f865b371: the pressure average channel is truly the pressure average for bi-level modes.
This changes the parsing to distinguish between the "flex pressure" reported
by single-pressure modes (which remains effectively EPAP) and the average
pressure reported by bi-level modes (which returns to its former average
pressure channel).
2020-01-28 11:26:31 -05:00
sawinglogz
369275988b Clean up error reporting when parsing PRS1 data chunks.
Also remove some error-handling code that we can't verify and probably
never worked correctly.
2020-01-28 09:34:02 -05:00
sawinglogz
20b5ae454c Fix pinch gestures so that spreading fingers zooms in. 2020-01-27 15:04:54 -05:00
sawinglogz
f865b37102 Remap PRS1 pressure average channel to EPAP, which it most closely matches.
Technically it's "flex pressure" and not true EPAP, since it's provided for
non-bi-level modes, but Flex is pretty close to bi-level.
2020-01-27 14:57:53 -05:00
sawinglogz
ef0cb253cd Add CPAP_PressureSet/EPAPSet/IPAPSet to daily statistics view.
Also add a breadcrumb for fixing average calculation for these channels.
2020-01-27 14:28:25 -05:00
sawinglogz
7a42caeccf Create new Troubleshooting submenu under Help and move a bunch of items there.
Also change "archive" to "zip" in the menu and prompts for sending diagnostic data.
2020-01-27 14:13:41 -05:00
sawinglogz
6d47210c95 Ask the user where to save screenshots (by default).
There's a new preference to turn this off.

Also update the release notes post-beta-1.
2020-01-27 14:00:41 -05:00
sawinglogz
5122524df7 Leave a breadcrumb for future work on Purge Oximetry, which only half works. 2020-01-27 12:37:10 -05:00
sawinglogz
277b2a5422 Infer the serial number from Viatom directory if possible. 2020-01-27 12:26:35 -05:00
sawinglogz
780a703f18 Tweak the unexpected data warning for Viatom now that we can import more than just single files. 2020-01-27 09:15:15 -05:00
sawinglogz
e11bdf2633 Update Viatom tests to process folders of test data. 2020-01-26 20:05:14 -05:00
sawinglogz
4ebc7d3681 Rename POS_Motion channel to POS_Movement to match Viatom report terminology.
Also move database updates to Open() rather than at each file imported.
2020-01-26 19:50:18 -05:00
sawinglogz
3548b083fe Move Viatom unexpected data warning to Open() instead of each file. 2020-01-26 18:28:10 -05:00
sawinglogz
8951068895 Add support for importing a whole folder of Viatom files. 2020-01-26 18:13:09 -05:00
sawinglogz
b6f7ebac6f Move Viatom filename pattern matching into loader. 2020-01-26 17:51:56 -05:00
sawinglogz
c06057ef14 Skip previously imported Viatom sessions. 2020-01-26 17:20:58 -05:00
sawinglogz
5e07187860 Fix the Viatom loader's mysteriously missing sessions.
It looks like SaveSummaryCache() would occasionally get called elsewhere
under certain circumstances, which would cause sessions to occasionally
save, but unpredictably. Now the summary cache gets saved consistently.
2020-01-25 17:35:58 -05:00
sawinglogz
c727e78d45 Add support for discontinuous Viatom data.
This now correctly shows gaps in the oximetry data when there are
invalid samples, rather than holding the previous values.
2020-01-25 16:55:32 -05:00
sawinglogz
2f7b39f808 Deduplicate Viatom 2s files to their true 4s resolution. 2020-01-25 14:50:45 -05:00
sawinglogz
61333aff07 Rewrite the Viatom header parsing to read all data and warn about unexpected data.
It turns out the 2s-resolution files are actually 4s resolution with
each sample reported twice! Fixing that is next.
2020-01-24 20:16:57 -05:00
sawinglogz
21e7ae8b61 Set event list rate based on step, fix Viatom header size. 2020-01-24 15:25:36 -05:00
sawinglogz
70de112192 Split Viatom parsing from importing, no functional change. 2020-01-24 15:20:00 -05:00
sawinglogz
ae8ce0e9d6 Remove tabs in Viatom loader and normalize whitespace to OSCAR convensions.
Also change from using sprintf/QDateTime::fromString to using Qt native objects.
No change in output.
2020-01-23 19:25:06 -05:00
sawinglogz
9cb7de950b Add regression tests for Viatom loader.
Also enable the native file dialog box for importing Viatom files.
2020-01-23 19:11:05 -05:00
sawinglogz
3fbc1777c5 Make Viatom loader MT_OXIMETER and remove MT_MULTI.
There's way too much logic throughout the code that makes assumptions
based on MT_OXIMETER.
2020-01-23 19:10:25 -05:00
sawinglogz
66f13f3143 Initial commit of contributed Viatom SpO2 loader.
Diff applied from the following commit by dave madden <dhm@mersenne.com>,
replacing tabs with spaces:

fa38850503
2020-01-23 12:57:44 -05:00
sawinglogz
94e39c2733 Use Qt standard shortcuts for printing, bold, italic, and underline.
In theory these will automatically get localized, since they're using
Qt's official enums.
2020-01-22 20:10:43 -05:00
sawinglogz
c4d16b7169 Add support for 1030X CPAP mode. 2020-01-22 19:52:49 -05:00
sawinglogz
640c110acd Make DreamStation settings size checks less picky.
They'll no longer refuse to load the session, and instead they'll flag
any small settings slices as unexpected data.
2020-01-22 19:34:42 -05:00
sawinglogz
65a48a6384 Merge branch 'master' into add-zip-archiving 2020-01-22 17:35:26 -05:00
sawinglogz
78d3155ecd Add zip creation of OSCAR data folder.
Also fix the zip progress bar when compressing more than 2GB data,
and prevent the zip file from ever trying to include itself.
2020-01-22 17:33:15 -05:00
Phil Olynyk
80edf9d4f9 Always use pre5.8 mSec to/from epoch calls 2020-01-22 14:23:37 -05:00
sawinglogz
5dfbc1fbe4 Add progress bar to zip creation. 2020-01-22 12:59:58 -05:00
sawinglogz
c4619dad35 Clean up zip API. 2020-01-22 11:25:20 -05:00
sawinglogz
607002ffa1 Separate directory walking from zip creation.
This is necessary for presenting a progress bar during zip creation.
2020-01-22 10:56:08 -05:00
sawinglogz
1c4c7871da Add zip creation of SD card data.
This uses the miniz library, which is self-contained in a single
.c/.h pair and has an MIT license.

Swapping out the zip library should be fairly straightforward
if ever necessary.
2020-01-21 17:37:37 -05:00
Phil Olynyk
04c085f924 Add code to use old calls with old Qt versions 2020-01-21 15:53:08 -05:00
Phil Olynyk
0dba31e58b Changes for old QT and compiler versions 2020-01-21 13:49:02 -05:00
sawinglogz
46e061d12b Add CPAP data card selection to archive creation workflow.
Also slightly refine some verbiage in the import process to make it simpler.

Zip creation still to come.
2020-01-21 12:56:08 -05:00
sawinglogz
36d3467a64 Refactor on_action_Import_Data_triggered into multiple functions.
No change in behavior.
2020-01-21 11:56:22 -05:00
sawinglogz
99badd40c3 Add menu entries for creating zip archives of SD cards and OSCAR data.
Also hide a few "not yet implemented" items.

Actual zipping comes later.
2020-01-21 11:22:49 -05:00
Guy Scharf
703fe2a613 Update awk and inno setup scripts for new versioning changes in Windows build tools
Version number in Windows oscar.exe has first three numbers same as string and fourth as 0
    Version number in Windows installer has first three numbers same as string and fourth indicates build type:
    0 = release, 100=alpha, 200=beta, 300=gamma, 400=rc
2020-01-19 18:18:21 -07:00
Guy Scharf
0a55e12d5b Merge branch 'master' into version 2020-01-18 19:58:13 -07:00
Guy Scharf
8a0dc47279 New update_gitinfo.bat and changes to oscar.pro to support new versioning on Windows 2020-01-18 19:56:25 -07:00
sawinglogz
aba58d9085 Second pass at fixing display of Preferences menu shortcut on macOS.
The previous fix didn't work 100% of the time either.
2020-01-18 20:34:10 -05:00
sawinglogz
d8cc142501 Add "ignore older than" support to PRS1 importer.
Now it actually works.
2020-01-18 20:16:31 -05:00
sawinglogz
91dbd3a204 Fix the display of Preferences menu shortcut on macOS.
It was appearing only on first launch, when OSCAR was asking where
to store its data. Now it appears consistently.
2020-01-18 17:01:35 -05:00
sawinglogz
127a3e1964 Fix logger thread so that it doesn't lose messages at startup.
This was particularly noticeable when running for the first time and
selecting OSCAR's data location.
2020-01-18 11:41:09 -05:00
sawinglogz
62b5ba3a60 Fix annoying precompiler limitation/bug in version sandbox logic. 2020-01-17 16:27:52 -05:00
sawinglogz
79ec192051 Fix update_gitinfo to detect detached head state properly. 2020-01-17 16:19:13 -05:00
sawinglogz
796f4659ab Update preference sandbox logic.
Release/RC version: no sandbox
Testing releases (tagged prerelease version): -test
Development builds: -branchname (if at the head of a branch)
                    -(commitid) (if in a headless state)

And in the unlikely event someone tries to build a non-release version
from a tarball instead of git, its sandbox will be "-unreleased".
2020-01-17 15:59:29 -05:00
sawinglogz
740ff460e7 Add version information to macOS application bundle and dmg. 2020-01-17 13:06:33 -05:00
sawinglogz
8417e7d43f Move macOS create_dmg script to its proper place. 2020-01-16 19:48:30 -05:00
sawinglogz
656f8a3c61 Attempt to update update_gitinfo.bat to match the bash script.
This is almost certain to be broken. Somebody with a Windows build
environment will need to test and fix it.
2020-01-16 17:47:48 -05:00
sawinglogz
083fa3debd Move version and git constants into #defines and update bash script.
The bash script now adds a #define if the current checkout is
exactly on a tag, and it leaves all #defines empty if building
from a tarball.

The batch file still needs to be updated.
2020-01-16 17:37:43 -05:00
sawinglogz
6d53fc5ebf Make the list of machines in the release notes an actual list. 2020-01-16 16:13:53 -05:00
sawinglogz
e125e79d00 Remove old build_number.h and infrastructure now that it's abandoned. 2020-01-16 16:07:55 -05:00
sawinglogz
768f32821a Clean up version.cpp, no functional changes. 2020-01-16 16:06:11 -05:00
sawinglogz
1f4bb2d435 Clean up build information and version interface.
This removes git dependencies from everything except for version.cpp,
and removes the associated interfaces in version.h.

Since the full version string contains the branch and revision
number where applicable, the build information no longer needs
to report branch and revision separately. It also now queries
version.cpp for a more consistent and reliable build time.

Debug output of build information is also now more consistent with
less redundant code.
2020-01-16 13:58:18 -05:00
sawinglogz
2e92107cce Update version display throughout to use the new information and be consistent.
The full version now includes the build/git information embedded within
it as build metadata according to the Semantic Versioning 2.0.0 spec,
for example: "1.1.0-beta-1+branch-name-a1b2c3d".

Now the full version string, with all detail is always displayed
EXCEPT for release versions, in which case just the simple version
number ("1.1.0") is displayed in the primary UI.

- Main window title: simple version for release versions, full version
    string otherwise
- Notifications: same as main window title
- System tray: same as main window title
- About window title: same as main window title
- About window release notes: always include full version string
- Reports: always include full version string
- Under the logo (about dialog, profile selector, new profile
    window): removed, as it is largely redundant and can
    interfere with the window geometry.
- Database upgrade alert: same as main window title
- Database newer alert: same as main window title

The full version string is also included within the preference and
profile .xml files, but because build metadata is ignored in version
comparisons, differences in builds will not cause any spurious
alerts. However, changes in prerelease versions will continue to
be significant, as they should be.
2020-01-16 13:05:55 -05:00
sawinglogz
80489a4b29 Add error handling in case a developer accidentally defines an invalid version. 2020-01-16 11:54:41 -05:00
sawinglogz
c71a953afd Add build metadata to version string.
Also update git scripts to make build metadata compliant with
semantic versioning.
2020-01-16 11:33:39 -05:00
sawinglogz
88957aeb7f Replace VersionString with getVersion() everywhere. 2020-01-15 19:45:46 -05:00
sawinglogz
f7f1ddfcbd Update version logic to drive entirely from defined string rather than individual components. 2020-01-15 19:27:03 -05:00
sawinglogz
93b9007f67 Remove old version comparison code. 2020-01-15 17:15:24 -05:00
sawinglogz
d7fade5f4c Add Version class for Semantic Versioning 2.0.0 parsing and comparison.
Also add unit tests for the new class.
2020-01-15 17:00:21 -05:00
sawinglogz
d898581ca4 Remove version.h dependency from appsettings.h to reduce unnecessary recompiling. 2020-01-15 16:34:28 -05:00
sawinglogz
fb32e16c96 Clean up version.h interface and reduce duplcate code.
Only minor cosmetic changes in how the version is displayed in
certain places.
2020-01-15 13:18:00 -05:00
sawinglogz
6f194507a8 Move version-related code into version.cpp. 2020-01-13 18:41:24 -05:00
sawinglogz
097362dfa1 Move version constants out of header file into new cpp file. 2020-01-13 18:41:24 -05:00
sawinglogz
cb036c4497 Remove some redundant hard-coding in daily settings view. 2020-01-12 20:17:07 -05:00
sawinglogz
787a6ed128 Fix PRS1 humidifer settings labels.
For this to be visible, the user needs to reset their channel
preferences to defaults. (This general limitation is logged as
an issue in Mantis.)
2020-01-12 20:13:21 -05:00
sawinglogz
46a81cd804 Fix PRS1 F5V01 flex parsing and add logging for F5V2.
Pre-DreamStation ASV flex settings should now be correct.
2020-01-12 19:34:51 -05:00
sawinglogz
2d3d5453b9 Update PRS1 flex parser for F0V234 based on remaining sample data.
Minimal changes, it was already mostly right.
2020-01-12 17:27:12 -05:00
sawinglogz
7909a26ab6 Split ParseFlexSetting into F0V234 and F5V012 versions, begin rewrite based on initial sample data.
These were incorrectly merged, resulting in convoluted logic and
occasionally incorrect results.  ASV is still very much a work in
progress.
2020-01-12 16:53:43 -05:00
sawinglogz
3b1d3028ff Document a few lingering PRS1 humidification samples. 2020-01-11 19:23:43 -05:00
sawinglogz
9edfd59476 Fix PRS1 humidity import.
Previously it was reporting spurious information when the humidifier was
disconnected.  Now it only reports settings details when the humidifier is
connected (the only time they're valid.)

It also now reports the humidification mode (fixed, adaptive, or heated
tube), and the heated tube temperature when appropriate.
2020-01-11 19:14:01 -05:00
sawinglogz
b0de30082c Update F0V6, F5V3 and F3V6 (DreamStation) humidifier parsing based on all available sample data.
No real change to functionality, other than confirming correct behavior,
documenting observed data and adding flags for anything new.
2020-01-11 15:13:24 -05:00
sawinglogz
37882ef750 Update F3V3 humidifier parsing based on all available sample data.
No real change to functionality, other than confirming correct behavior,
documenting observed data and adding flags for anything new.
2020-01-10 17:28:31 -05:00
sawinglogz
5bfcda73c6 Update F0V4 and F5V12 (60-Series) humidifier parsing based on all available sample data.
No real change to functionality, other than confirming correct behavior,
documenting observed data and adding flags for anything new.

The ParseHumidifierSettingF0V4 function has now been renamed to
ParseHumidifierSetting60Series for accuracy.
2020-01-10 16:45:12 -05:00
sawinglogz
05779eac4f Update FV023 and F5V0 summary parsers to parse the humidification at equipment-off.
Accordingly update ParseHumidifierSetting50Series to add a parameter
controlling whether parsed settings should be imported or not,
consistent with all other PRS1 humidifier parsers.
2020-01-10 12:57:18 -05:00
sawinglogz
7028f20aaf Update F0V23 and F5V0 humidifier parsing based on all available sample data.
The ParseHumidifierSettingV2 function has now been renamed to
ParseHumidifierSetting50Series for accuracy, and the code and
parameters which had been used when 60-Series machines (incorrectly)
relied on it has been removed.
2020-01-10 12:39:54 -05:00
sawinglogz
b9c598127c Add observations from initial batch of PRS1 humidification samples, add instrumentation to identify additional samples.
Also add initial fixes to F5V0 humidifer parsing, which was probably wrong.
2020-01-10 10:49:08 -05:00
Guy Scharf
25ed86401c Merge branch 'master' into timedbreath 2020-01-07 23:39:38 -07:00
sawinglogz
b6c2aa4610 Improve macOS create_dmg script and update Qt Creator build instructions. 2020-01-07 19:40:58 -05:00
sawinglogz
50b47a9bff Fix the tail ends of statistic channels on PRS1.
The last statistics events in each slice are now correctly imported.

Previously, in the surprising edge case where two statistic periods are
reported with the same end-of-slice timestamp, they were both being duplicated
when marking the end of the slice.

Also, there were scattered instances where the final statistics in a slice
weren't being imported at all or were being imported incorrectly. These are
now fixed as well.
2020-01-06 21:45:52 -05:00
sawinglogz
cd35f6d4d7 Add internal pseudo-event for PRS1 parsers to mark the boundary between statistic intervals.
No change in import behavior yet, but this will be needed to deal with a weird edge
case in which two statistic periods are reported with the same end-of-slice timestamp,
the first one intended to cover the preceding 2 minutes, the second one presumably
intended to cover the fractional second after the previous interval, though all
values are 0, so it's hard to be sure.
2020-01-06 11:59:15 -05:00
sawinglogz
97c7a4f557 Update PRS1 test YAML to emit first and last N/2 samples instead of first N, allowing for regression testing of end-of-session edge cases. 2020-01-05 16:02:04 -05:00
sawinglogz
43716793b4 Add user alert when unexpected PRS1 data is encountered on import.
Also rename some variables for clarity.
2020-01-04 22:06:28 -05:00
sawinglogz
26a844c720 Add infrastructure to allow PRS1 loader to alert the user when it encounters unexpected data.
Only the tests currently react to this information.
2020-01-04 20:47:28 -05:00
sawinglogz
41579d4919 Reset import warnings when running a new version of OSCAR. 2019-12-30 14:25:37 -06:00
Phil Olynyk
ccba19b3d2 Conditionalize debug output with DEBUG_SESSION and DEBUG_IDENT 2019-12-30 11:14:05 -05:00
Guy Scharf
280c847996 Eliminate MINOR_FLAG from list of indices on Daily page.
This results in Timed Breath no longer being shown in the index list.
2019-12-29 22:56:54 -07:00
sawinglogz
fdd1b658a2 Update PRS1 loader to respect new preference for warnings on untested machines. 2019-12-29 22:09:46 -06:00
sawinglogz
9521de7e18 Add preferences to disable import warnings for untested machines and unexpected data.
The preferences don't have any effect yet.
2019-12-29 21:54:59 -06:00
sawinglogz
3be691f2d8 Add README to macOS .dmg and "make dist-mac" target to do so.
The build instructions for Qt Creator still need to be updated
to use the new create_dmg script.
2019-12-29 15:56:17 -06:00
Guy Scharf
41bd1ded63 Show n/a for pressure on Daily page below AHI if there is no valid value. Also update release notes to reflect this. 2019-12-28 23:16:59 -07:00
sawinglogz
f1bd9c585b Merge branch 'master' into leave-new-charts-enabled 2019-12-27 23:08:04 -06:00
sawinglogz
47f38ab29e Remove obsolete TODOs and commented-out code in PRS1 loader. 2019-12-27 23:05:15 -06:00
sawinglogz
4976d7077e Fix the missing import progress dialog when forcing a rebuild.
Because opening a profile already had a progress dialog open, the import
process during a forced rebuild wasn't appearing, so it would look like
OSCAR was hanging for as long as the import took.

Temporarily hiding the profile progress dialog resolves the issue.
2019-12-27 22:29:18 -06:00
sawinglogz
ba44887853 Bump the PRS1 loader version to force rebuilds of PRS1 data.
This was bumped once already after the previous release version, but
bumping it again now will make sure that all beta testers are working
from data based on the current state of the PRS1 loader.
2019-12-27 22:10:02 -06:00
sawinglogz
b90571e940 Change the name of the PRS1_0E channel so that its new color takes effect by default.
Originally it wasn't being drawn as a span, so black was fine. That doesn't work so well now.
2019-12-27 22:08:59 -06:00
sawinglogz
e74bfbf2fd Change the channel IDs for pressure/IPAP/EPAP-Set events so that the previous fix always works.
Settings are written as soon as a day is viewed, so anybody who viewed
their PRS1 data prior to the previous commit would have settings with the
channels expressly disabled. Changing the channel ID forces them to be
treated as new, and thus default to on.
2019-12-27 22:06:31 -06:00
sawinglogz
d02e1dd235 When loading settings, leave unspecified defaults alone.
This prevents new charts (such as CPAP_PressureSet, etc.) from being
disabled by virtue of their being absent from existing settings.
2019-12-26 16:04:54 -06:00
Guy Scharf
7c15e9bd9c Add PressureSet, EPAPSet, and IPAPSet lines to Statistics page 2019-12-24 23:12:49 -07:00
Phil Olynyk
031989e300 Final re-arrangement of resmed import code 2019-12-23 21:44:10 -05:00
Guy Scharf
66575d17d4 Documentation for 1.1.0-beta-1 2019-12-18 23:34:53 -07:00
sawinglogz
14aad44f21 Add support for newly observed PRS1 EZ-Start in Auto-CPAP mode. 2019-12-07 15:10:48 -05:00
sawinglogz
a495defdce Add support for P-Flex and add 501X120 to tested list. 2019-12-03 19:04:09 -05:00
sawinglogz
e380b408fd Remove warnings about PRS1 oximetry being untested.
Also fine-tune various warnings for weird data, such as truncated
chunks and multiple sessions in a waveform file.
2019-12-02 17:30:28 -05:00
sawinglogz
8740ddf923 Add pressure pulse event observed on F5V1. 2019-12-01 18:21:18 -05:00
sawinglogz
7d355f3699 Confirmed F5V1 slice 8 has a timestamp. 2019-12-01 18:16:57 -05:00
sawinglogz
23007c9223 Add observed disconnected alarm setting to F5V1. 2019-12-01 18:01:32 -05:00
sawinglogz
13c7ab8629 Gracefully handle PRS1 summary chunks with zero length. 2019-12-01 17:30:39 -05:00
sawinglogz
c0e3c22e88 Move PRS1 waveform session ID check out of parser and into import.
It turns out that some F5V1 machines record both decimal and hex
filenames for some reason.
2019-12-01 16:44:24 -05:00
Guy Scharf
29a782731f Add missing translation call for a tooltip 2019-11-21 16:39:36 -07:00
sawinglogz
4321c3685a Add 951P to PRS1 tested list.
Also add support for parsing and proceeding past a previously
unseen F5V0 event, though for now it's just getting swallowed
since its meaning isn't entirely clear.
2019-11-20 12:33:45 -05:00
sawinglogz
6b413d0bb6 Fix PRS1 chunk YAML to include labels for internal F3V3 events added in 3c214db1.
Also remove obsolete comments and events.
2019-11-19 20:08:10 -05:00
sawinglogz
46c9d4f0c8 Chase down PRS1 unordered time warnings and add an explanatory TODO comment.
Also fix some whitespace.

No functional changes.
2019-11-19 16:00:08 -05:00
sawinglogz
60ec8711dc Report PRS1 BND regions based on mask-off slices rather than gaps in waveform data.
This adds BND flagging to machines without waveform data, such as F3V3 (1160P)
and bricks (250P, 200X), as well as sessions for which waveform data was
unavailable. It also catches BNDs at the end of a session, which were
previously missed.
2019-11-19 15:05:08 -05:00
sawinglogz
36a85111fd Add end data points to PRS1 interval events.
By duplicating the last reported event at its originally reported
event (clamped to the slice end time for F3V3), charts will now
correctly show the value during that last interval.

Also fix some slice sanity checks so they don't yell when F3V3
skips an event chunk.
2019-11-19 14:18:13 -05:00
sawinglogz
89a707a664 Create separate event lists per slice for remaining PRS1 machines.
This now correctly shows gaps in therapy and statistics when the
mask is off. It also corrects the initial statistics for some sessions
to 1 second later, when the initial mask-on slice begins 1 second
after the session starts.

Weird zero-length PB and LL events are now dropped on import, since
they wouldn't get drawn anyway and seem to be peculiar artifacts.
2019-11-19 12:29:45 -05:00
Phil Olynyk
eeed7c29bc Split resmedEDFinfo class into new files 2019-11-17 16:41:47 -05:00
sawinglogz
d9212a19fa Split PRS1 interval event determination into IsIntervalEvent.
Also fix F3V3 CA/OA/HY timestamps, which weren't shifted left.
2019-11-16 20:07:52 -05:00
sawinglogz
903fae6546 Split interval handling out of switch statement in PRS1Import::ImportEventChunk.
This will allow special treatment of interval events in multiple places within
the function.
2019-11-14 19:24:45 -05:00
sawinglogz
06adbc1e72 Mark any PRS1 sessions with empty slices as summary and skip event or waveform data.
If there are no mask-on slices of nonzero duration, then there's not any
meaningful event or waveform data for the session. There is occasionally some
fragmentary data, but it's always less than 1 second.

When such fragmentary waveform data is present, it only contains 1-3 nonzero
samples, corresponding to 0.2s - 0.6s of data, which suggests that the
mask-on slice was really that long rather than precisely 0.  As a result,
it appears that the timestamps of the mask-on/mask-off slices are just the
current value of the machine's internal clock, which only has 1-second
resolution.

But rather than embark on herculean efforts to derive a sub-second slice
duration from (only occasionally present) event or waveform data, we just
treat the session as having no detailed data.
2019-11-13 20:44:35 -05:00
sawinglogz
959cc3ef92 Add 1030X150 to list of tested PRS1 machines.
The only change in data observed so far is a wider range of rise time.
2019-11-13 11:39:02 -05:00
sawinglogz
1934c2c44e Use PRS1 summary start & end as session start & end.
Because summaries used to be parsed incorrectly, there was a bunch of ugly
logic that was designed to infer the session start & end times from other data.

Now that the summary parsers work, that can all go away. The only change to
imported data is that sessions ending with the mask off are now longer, to
reflect that extra time before the machine was turned off.
2019-11-13 11:25:59 -05:00
sawinglogz
cf2d2631d3 Create separate event lists per slice on F3V3 (1160P).
This now correctly shows gaps in therapy and statistics when the
mask is off. It currently only works for F3V3, since it has a
separate event chunk per slice. Other machines, which have only
a single large event chunk, will need to track the slices as
they import events.

This also highlights the issue with the last statistics in a
slice: only one data point is imported indicating the start of
a measured value, and so it appears that the data terminates then
instead of at the end of the slice (seconds to minutes later).
2019-11-13 09:27:47 -05:00
sawinglogz
3c214db13d Fix PRS1 F3V3 parser to use ending timestamps like all the other parsers.
This fixes a regression introduced by fda9fcd1, which fixed import for
all the other machines but broke F3V3.

Also move the generation of HY/CA/OA events out of the parser and into
the importer.
2019-11-13 09:15:04 -05:00
Phil Olynyk
433c60f195 Add tr(..) call to updateMessage 2019-11-11 21:10:43 -05:00
sawinglogz
19facdba8f Filter out zero-length and equipment-off PRS1 slices when importing a session.
Also clean up some tests for failed channel/event creation since they can never fail.
2019-11-09 15:09:02 -05:00
sawinglogz
2a2b36cfc7 Refactor PRS1Import::ImportSlice out from ImportSummary and ImportCompliance. 2019-11-07 17:35:09 -05:00
sawinglogz
ff630b07a6 Split PRS1Import::ImportEvent from ImportEventChunk.
This will let us create "duplicate" statistical events at the end of
a session (and eventually slice) to reflect the end time of each
measurement channel.
2019-11-07 14:19:58 -05:00
sawinglogz
db1df4eeef Add missing PRS1UnknownDurationEvent entries to F0 supported events.
Also add a debug message when a session is skipped due to length or age
(due to preferences).
2019-10-30 18:38:13 -04:00
sawinglogz
fda9fcd116 Shift PRS1 statistics left 2 minutes on import.
PRS1 statistics are reported at the end of a 2-minute interval,
but OSCAR assumes the timestamp for the statistics is their
starting timestamp.

This resolves the issue where statistics wouldn't appear for the
first two minutes of a session, and then would consistently be
2 minutes delayed.

There are still some edge cases to deal with, but the general
case is much improved.
2019-10-29 16:39:48 -04:00
sawinglogz
de73d3756c Import and graph unknown PRS1_0E spans.
Also clean up unused PRS1 channels and fix a regression from
9a25647c that broke unintentional leak calculation for CPAP/APAP.

Also add PRS1PressureAverageEvent to F0V4 list of supported events.
2019-10-29 14:06:57 -04:00
sawinglogz
9a25647c25 Add initial support for PRS1 settings channel (as distinct from statistics).
Right now this results in slightly confusing graphs, since sometimes
the IPAP/EPAP data for a machine is primarily reported by its settings
events, and for other machines by its statistics events. Also, the
"average" pressure on F0 looks like it might be effectivley EPAP in
single-pressure mode rather than the true average in bi-level mode.

Once we decide on the best presentation, we can either update the importer
or the display to show the most helpful channels for a given session.
2019-10-29 11:14:57 -04:00
sawinglogz
9771c75eec Merge branch 'master' into prs1-older-cleanup 2019-10-25 21:39:39 -04:00
sawinglogz
d2764eb276 Add support for PRS1 sessions with waveform data split between files.
Occasionally waveforms in a DreamStation session can be split into
multiple files. This behavior resulted in a report of missing waveform
data, and upon investigation was found 15 times out of 10,000 sample
sessions.

It looks like this happens when the machine begins writing the waveform
file before realizing that it will hit its 500-file-per-directory limit
for the remaining session files, at which point it appears to write
the rest of the waveform data along with the summary and event files
in the next directory.

The previous commit added better testing support and warning messages
for when this is encountered. This commit fixes the issue, and so
the warning is no longer necessary.
2019-10-25 21:36:49 -04:00
sawinglogz
3e42703399 Update PRS1 tests to allow for session chunks to be split between files.
Also warn when waveform files are being skipped on import due to this
kind of splitting.

The chunks YAML now emits all unique chunks found in files with the
same session ID.

Note that a single file can contain multiple chunks covering multiple
sessions. These will all be saved in the YAML file corresponding to the
original file's name, rather than the session ID encoded in any chunk.

This slight discrepancy is intentional, since the chunk YAML is meant
to test the parsers, to verify that they correctly decode a specific
input file. When importing data into a session, we use the actual
session ID specified by each chunk. Thus the session YAML files will
be derived from the proper chunks, regardless of their original
containing file. (Well, except for waveforms, but they don't appear
to have more than one session ID per file.)
2019-10-25 18:02:02 -04:00
sawinglogz
3267078608 Add support for multiple event chunks in a session, fixing events in 1061T and 1160P.
F3V3 events are formatted as waveforms (rather than a series of timestamped
events), with one chunk per mask-on slice. The previous assumption of only
a single event chunk per session meant that all events after the first slice
were getting dropped.

BiPAP AVAPS 30 (System One 60 Series) now works much better, although the data
doesn't yet show any gaps where the mask is off. Fixing that requires changes
throughout the code and not just in the PRS1 loader.

Also, LL calculation seems wrong. Perhaps the automatic calculation of
unintentional leak from total leak doesn't work for AVAPS, throwing off
automatic LL calculation? (F3V3 reports neither unintentional leakage nor
large leak events.)
2019-10-24 16:25:36 -04:00
sawinglogz
e356b7816b Don't treat a 0-length compliance file as a failure in parsing.
This fixes the start/end times of such compliance sessions, but their
total_time is broken due to the presence of a 0-length slice.

That will require a more extensive fix of the slice system throughout
the program.
2019-10-24 12:19:13 -04:00
sawinglogz
8297760fa8 Update PRS1 ParseComplianceF0V23 to use the same event loop structure as ParseSummaryF0V23.
No change in functionality.
2019-10-24 11:44:47 -04:00
sawinglogz
d6e4e42f2a Clean up PRS1Import::ParseEvents to remove dead code.
Also reinstate some warnings now that parsers are all working.

No change in functionality.
2019-10-24 11:07:47 -04:00
sawinglogz
2df3325a52 Merge PRS1 F0, F3 and F5 event importers into ImportEvents since they're now identical.
No change in functionality.
2019-10-23 21:10:56 -04:00
sawinglogz
c50d037a54 Reconcile PRS1 F0, F3, F5 importers to remove their remaining differences.
F3 TB gain changes to 0.1 in the imported data, but this has no effect
on how OSCAR handles it.

No other change in functionality.
2019-10-23 16:26:25 -04:00
sawinglogz
3c6996f19b Add unintentional leak calculation to F3 importer, where it is never needed.
This resolves a regression in 4c55f9a4 that broke F3 imports, but has
no other effect.
2019-10-22 14:48:34 -04:00
sawinglogz
2c7ae6fc99 Move default F0 single-channel handlers into the default case.
Also update the F5 importer to remove some redundancy and make it closer to F0.

No change in functionality.
2019-10-22 13:26:41 -04:00
sawinglogz
8cbdb49e68 Migrate PRS1 F0 importer to PRS1Import::AddEvent.
The only change in functionality is that F0 sessions won't
have empty channels for PP when there are no PP events.
2019-10-22 12:30:42 -04:00
sawinglogz
4c55f9a484 Move default F5 single-channel handlers into the default case.
Also update the leak calculation logic to depend on the set of reported
events rather than hard-coding it based on machine family and version.

No change in functionality.
2019-10-22 10:40:14 -04:00
sawinglogz
b80c5ef114 Migrate PRS1 F5 importer to PRS1Import::AddEvent.
The only change in functionality is that F5V2 sessions won't have
empty channels for CA, VS, and LL, since they're not yet supported
by the parser.
2019-10-22 10:24:40 -04:00
sawinglogz
79b2af140c Merge PRS1 F3 event importers into ImportEventsF3V36 since they're now identical.
No change in functionality.
2019-10-20 21:58:36 -04:00
sawinglogz
fdecab709d Clean up PRS1 F3 importers to remove their remaining differences.
No change in functionality.
2019-10-20 21:50:32 -04:00
sawinglogz
b0e2db4446 Move default F3V3 and F3V6 single-channel and non-imported handlers into the default case.
Also remove the explicit pressure GAIN set in the importers, since now the parser's gain
is passed through automatically.

No change in functionality.
2019-10-20 21:41:36 -04:00
sawinglogz
26c88cd713 Coalesce switch cases in F3V3 and F3V6 event importers.
No change in functionality.
2019-10-20 21:22:49 -04:00
sawinglogz
ed608e3b17 Convert F3V3 and F3V6 parsers to use PRS1Import::AddEvent entirely.
This is again confirmed not to change import results, but is still
very duplicative.
2019-10-20 21:09:34 -04:00
sawinglogz
ada3bbe891 Add infrastructure to allow import of parsed PRS1 events to be unified.
This commit adds a mapping from PRS1 events to the OSCAR channels that
should receive the data, along with the necessary supporting code to
allow for generic handling of PRS1 events as a result.

The F3V6 importer has minimal changes to partially use the new
plumbing, enough to make sure that it works and causes no change in
the imported data.
2019-10-20 17:46:18 -04:00
sawinglogz
fd9c73f79f Clean up PRS1 F3 (ST and AVAPS) importers to minimize their differences.
Also add the beginnings of a per-model list of parsed/supported events.
2019-10-19 17:35:45 -04:00
Phil Olynyk
efa7c7d313 remove unsupported compile option for old compilers 2019-10-13 20:06:05 -04:00
sawinglogz
9bd7a4942b Calculate PS for PRS1 F3 machines (S/T and AVAPS models). 2019-10-10 20:13:39 -04:00
sawinglogz
75fca0c951 Merge PRS1 F5 event importers into ImportEventsF5V0123 since they're now identical.
No change in functionality.
2019-10-10 18:11:02 -04:00
sawinglogz
86cc4fa210 Clean up PRS1 F5 importers to remove their remaining differences.
No change in functionality.
2019-10-10 17:55:27 -04:00
sawinglogz
abb7ddd9cb Don't calculate unintentional leak for PRS1 autoSV 60-series machines, which report it.
This fixes 960P-960T, which was importing both values at each interval, presumably
trampling each other. 950P didn't report it, and DreamStation never calculated it.

Also fix timed breath gain for pre-DreamStation autoSV.
2019-10-10 17:23:07 -04:00
sawinglogz
6715e05f61 Clean up PRS1 F5 (autoSV) importers to minimize their differences.
Timed breaths durations are now fixed for 950P-961P, and
960T pressures are now imported correctly.
2019-10-10 16:47:52 -04:00
sawinglogz
a1e66d1c62 Merge PRS1 F0 event importers into ImportEventsF0V2346 since they're now identical. 2019-10-10 14:38:18 -04:00
sawinglogz
e948a45baa Clean up PRS1 F0 importers to minimize their differences.
450P through 960P no longer report the snore count in parentheses
in their VS2 flags.
2019-10-10 14:18:39 -04:00
sawinglogz
a41debc57b Fix PB and LL start times for PRS1 450P through 960P. 2019-10-10 13:23:20 -04:00
sawinglogz
964ddc855a Clean up PRS1 importers to reveal any significant differences between them.
F3V6 now reports its snore count flags as VS2 in order to be consistent
with all other models. It doesn't seem to  report individual VS events.
2019-10-10 12:46:47 -04:00
sawinglogz
42948b2d3c Check duplicate PRS1 chunks on import to confirm that they are identical, warn if not. 2019-10-10 10:34:36 -04:00
sawinglogz
6ee83576b2 Clean up F3V3 summary and event parsing.
F3V3 is unusual. Its events are recorded at fixed intervals like a waveform.
Its summary is recorded with absolute timestamps. Slices are each given their
own chunks in the event file.

This last oddity isn't yet handled.

While examining this, a few other importing issues have been cleaned up:
PRS1DataChunk::ParseEvents no longer needs the mode passed in as an argument,
F5V012 importers should quietly eat the newly parsed pressure
adjustment events until we can import both those and average pressure
statistics, and F5V012 importers should handle real VS events and treat
VS statistics like the other importers do.
2019-10-09 13:35:02 -04:00
sawinglogz
f01ea9b165 Improve PRS1 F3V3 (1061T, 1160P) parsing.
Import is still not working correctly, but the parsing now seems
correct, as far as we can verify it at this point.
2019-10-09 10:24:29 -04:00
sawinglogz
a8df58b1ef Clean up ParseEventsF5V2 switch statement based on sample data.
This is very incomplete since we currently have only limited sample
data for F5V2. The events that have been verified will parse
correctly, and the rest will result in a parsing error.

There are some very strange changes in the event numbers compared
to F5V1 and F5V3, it's unclear why.

Note that F5V2 uses a gain of 0.125 like F5V3 instead of 0.1 like F5V1.
2019-10-08 16:49:29 -04:00
sawinglogz
1946be162c Add support for 16-bit timestamps in F5V1 events. 2019-10-08 11:20:51 -04:00
sawinglogz
5872a9519e Clean up ParseEventsF5V1 switch statement based on sample data.
F5V1 introduces a new Hypopnea variant (event 8) with 2 data bytes.
This was previously seen in F5V3, and it's unclear how this is
different from the usual Hypopnea event (event 7, 1 data byte).
Parsing used to stop when it encountered this event, but now it
can continue through the end of the session.

F5V1 also adds a leak value in its periodic stats, also previously
seen in F5V3. PB start time and duration are now correct.

As with F5V0, now VS, LL, and EPAP adjustment are correctly parsed,
and timestamps and durations are now accurate.

The handlers were essentially copied from F5V3 and F5V0 for
consistency and cross-checking.
2019-10-08 10:44:18 -04:00
sawinglogz
15f7dacbab Clean up ParseEventsF5V0 switch statement based on sample data.
This fixes a lot of issues with event parsing. Now VS, LL, and EPAP
adjustment events are now correctly parsed.

And as a result the timestamps for events and overall session durations
are now accurate.

The handlers were essentially copied from F5V3 and F0V12 for
consistency and cross-checking.
2019-10-05 20:52:34 -04:00
sawinglogz
4119a57278 Comment out unused familyVersion logic in split F5V0, F5V1, F5V2 event parsers.
No change in functionality.
2019-10-04 20:51:24 -04:00
sawinglogz
380c9d4071 Split ParseEventsF5V012 into separate functions for F5V0, F5V1, and F5V2.
No functional changes.

There's a lot of duplication, but that can be cleaned up once the parsers
work correctly.
2019-10-04 20:10:35 -04:00
sawinglogz
07aec55d80 Migrate F5V012 event loop logic to match F0V4.
No changes were intended in the imported data, but the parsers
were fantastically broken, so touching anything in the code
results in lots of differences in the output.

As a result, the imported data for F5V012 is now unstable.

On the plus side, the parser no longer bails on event 8 for F5V1.

This will almost certainly need to be split into 3 separate
functions.
2019-10-04 19:55:18 -04:00