mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Add time stamp to the debugging printout of vendor specific samples
They are useful for debugging things in libdivecomputer and this way it's easier to match the data to specific points in the dive profile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2581b3870f
commit
46b64d8e21
1 changed files with 2 additions and 1 deletions
|
@ -247,7 +247,8 @@ sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
|
|||
printf(" <bearing>%u</bearing>\n", value.bearing);
|
||||
break;
|
||||
case DC_SAMPLE_VENDOR:
|
||||
printf(" <vendor type=\"%u\" size=\"%u\">", value.vendor.type, value.vendor.size);
|
||||
printf(" <vendor time='%u:%02u' type=\"%u\" size=\"%u\">", FRACTION(sample->time.seconds, 60),
|
||||
value.vendor.type, value.vendor.size);
|
||||
for (i = 0; i < value.vendor.size; ++i)
|
||||
printf("%02X", ((unsigned char *) value.vendor.data)[i]);
|
||||
printf("</vendor>\n");
|
||||
|
|
Loading…
Reference in a new issue