Suunto EON Steel: add desaturation time reporting
The EON Steel reports it in seconds remaining after the dive. That's a bit excessive, but I guess SI units is where it's at. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5d4e1f97db
commit
69d26e00b0
@ -1344,6 +1344,16 @@ static int traverse_diving_fields(suunto_eonsteel_parser_t *eon, const struct ty
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!strcmp(name, "DesaturationTime")) {
|
||||
char desat[16];
|
||||
unsigned int time = array_uint32_le(data); // In seconds!
|
||||
|
||||
// Let's just agree to ignore seconds
|
||||
time /= 60;
|
||||
snprintf(desat, sizeof(desat), "%d:%02d", time / 60, time % 60);
|
||||
return add_string(eon, "Desaturation Time", desat);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user