diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-27 17:36:42 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-27 17:36:42 -0800 |
commit | 3d8d5da999264595c7fecc786c101b40573689df (patch) | |
tree | c481e7d241f8239eaa786201ef908b20e72071c4 /cochran.c | |
parent | 1a66a74e8a35c1fd85060060ba61bb1b67d6eb44 (diff) | |
download | subsurface-3d8d5da999264595c7fecc786c101b40573689df.tar.gz |
Fix up Cochran dive header decoding offset
It turns out the odd "different CAN files have different header offsets"
came from the fact that the decode block was different lengths, and I
had not picked the correct place to start - and instead had found two
different places that were at different offsets due to the decode block
length differences.
This fixes that up, and it looks like the dive header is correctly
descrambled (but what the data *means* is unclear, although there is now
an ASCII date and time visible, so at least one part of it is pretty
obvious).
The actual dive data unscrambling is still different for the two
test-files I have to play with, I do not know why.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'cochran.c')
-rw-r--r-- | cochran.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -135,11 +135,7 @@ static void parse_cochran_header(const char *filename, * The header scrambling is different form the dive * scrambling. Oh yay! */ -#if 0 // Alex - partial_decode(0x058c, 0x0b14, decode, 0, mod, in, size, buf); -#else // Don - partial_decode(0x05a0, 0x0b14, decode, 0, mod, in, size, buf); -#endif + partial_decode(0x010e, 0x0b14, decode, 0, mod, in, size, buf); partial_decode(0x0b14, 0x1b14, decode, 0, mod, in, size, buf); partial_decode(0x1b14, 0x2b14, decode, 0, mod, in, size, buf); partial_decode(0x2b14, 0x3b14, decode, 0, mod, in, size, buf); |