Fix the decoding of the dive time.
The dive time is stored in two separate bytes: one for the number of minutes, and another one for the hours. Since we only took into account the first byte containing the minutes, the divetime for dives longer than one hour was always too short.
This commit is contained in:
parent
ae93a6ab08
commit
af7e7aed19
@ -162,7 +162,7 @@ oceanic_veo250_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, un
|
||||
if (value) {
|
||||
switch (type) {
|
||||
case DC_FIELD_DIVETIME:
|
||||
*((unsigned int *) value) = data[footer + 3] * 60;
|
||||
*((unsigned int *) value) = data[footer + 3] * 60 + data[footer + 4] * 3600;
|
||||
break;
|
||||
case DC_FIELD_MAXDEPTH:
|
||||
*((double *) value) = parser->maxdepth;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user