Use only 11 bits for the depth.

When using up to 14 bits for the depth, the resulting values are too
large in some cases. Most likely the upper bits are used to store
something else. Even with only 11 bits, the resulting depth range
(0-204.7m) should still be more than sufficient.
This commit is contained in:
Stephane Bensoussan 2013-10-20 22:08:56 +02:00 committed by Jef Driesen
parent 938839e694
commit 4c94460831

View File

@ -162,7 +162,7 @@ cressi_leonardo_parser_samples_foreach (dc_parser_t *abstract, dc_sample_callbac
dc_sample_value_t sample = {0};
unsigned int value = array_uint16_le (data + offset);
unsigned int depth = value & 0x3FFF;
unsigned int depth = value & 0x07FF;
// Time (seconds).
time += interval;