Commit Graph

116 Commits

Author SHA1 Message Date
sawinglogz
21adfb7987 Fix header parsing for 1160P event files, fix misconceptions in ReadWaveformHeader.
Now that we check header checksums, it uncovered a problem parsing 1160P event
headers. It turns out that the 1160P uses a "waveform" header for its .002
events files. So we can't use the file extension to decide which header to
parse, but there's a flag in the standard header that seems to reliably indicate
a waveform header. The 1160P events are listed at fixed intervals, as are
waveforms, so the flag has been named "interval" rather than "waveform."

The 1160P event headers have more than 2 signals in the header and an interval
longer than 1sec. This clarified the meaning of multiple waveform header fields
that were previously being parsed incorrectly.
2019-05-18 19:17:55 -04:00
sawinglogz
1c564fb296 Calculate and check PRS1 CRC16 on V2 files. 2019-05-15 15:16:14 -04:00
sawinglogz
c8cd66992a Split PRS1DataChunk::ReadHeader into ReadHeader/ReadNormalHeaderV2/ReadNormalHeaderV3. 2019-05-15 12:32:39 -04:00
sawinglogz
d3c6d6445b Split PRS1DataChunk::ReadHeader into ReadHeader/ReadWaveformHeader. 2019-05-15 10:26:31 -04:00
sawinglogz
e07c4ce63c Split PRS1DataChunk::ReadHeader into ReadHeader/ReadData. 2019-05-15 08:36:31 -04:00
sawinglogz
451963de25 Move chunk parsing into PRS1DataChunk class.
The diff looks messy, but it's mostly chunk -> this search-and-replace.
2019-05-14 22:49:41 -04:00
sawinglogz
d7cd22c918 Separate checksum reading in PRS1Loader::ParseChunk instead of burying it with other data.
While slightly more verbose, this makes the code more clearly correct.
2019-05-14 20:47:00 -04:00
sawinglogz
74863e538a Split PRS1Loader::ParseFile in to ParseFile/ParseChunk. 2019-05-14 18:57:04 -04:00
sawinglogz
76053b0469 Check for format change before coalescing PRS1 chunks, move data warnings out of parsing. 2019-05-14 16:20:32 -04:00
sawinglogz
9b3aaad4b0 Move PRS1 waveform chunk coalescing out of parsing and into importing. 2019-05-13 21:23:20 -04:00
sawinglogz
d4b65d8e73 Make Event and Loader/PRS1Loader protected and private members public during unit testing. 2019-05-04 21:50:45 -04:00
sawinglogz
7c0c13486c More refactoring of PRS1Loader::OpenMachine(). 2019-05-03 16:59:26 -04:00
sawinglogz
02ffeb6c39 Allow a test profile to be created at an arbitrary path.
Currently there is a very messy tangle of dependencies between
loaders, machines, sessions, and profiles. Right now the
simplest way to create a test loader instance is to create
a test profile, under which the machine and session instances
will exist.
2019-05-03 16:36:53 -04:00
sawinglogz
7937b57b5f Split out PRS1Loader::ScanFiles() from PRS1Loader::OpenMachine(). 2019-05-03 15:07:15 -04:00
sawinglogz
4599dd781f Refactor PRS1Import::run() so that parsing can be called separately from saving to the database. 2019-05-03 14:45:21 -04:00
Phil Olynyk
17b53482bd Change folder and file name from oscr to oscar 2019-02-22 19:23:39 -05:00