summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-01-27 17:36:42 -0800
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-01-27 17:36:42 -0800
commit3d8d5da999264595c7fecc786c101b40573689df (patch)
treec481e7d241f8239eaa786201ef908b20e72071c4
parent1a66a74e8a35c1fd85060060ba61bb1b67d6eb44 (diff)
downloadsubsurface-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>
-rw-r--r--cochran.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/cochran.c b/cochran.c
index 650a479b1..ce42c3131 100644
--- a/cochran.c
+++ b/cochran.c
@@ -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);