From ebe670474708b59b292e435e5433684f352ec64e Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 21 Nov 2014 13:00:12 -0800 Subject: [PATCH] Add support to return serial number to OSTC devices This data isn't per dive, but it makes sense to return it here as a string (we already return it as unsigned int in the devinfo event after opening the device). Signed-off-by: Dirk Hohndel --- src/hw_ostc_parser.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hw_ostc_parser.c b/src/hw_ostc_parser.c index 706ac58..97b84dc 100644 --- a/src/hw_ostc_parser.c +++ b/src/hw_ostc_parser.c @@ -541,6 +541,10 @@ hw_ostc_parser_get_field (dc_parser_t *abstract, dc_field_type_t type, unsigned string->desc = "FW Version"; snprintf(buf, BUFLEN, "%0u.%0u", data[layout->fw_version], data[layout->fw_version + 1]); break; + case 3: /* serial */ + string->desc = "Serial"; + snprintf(buf, BUFLEN, "%u", parser->serial); + break; default: return DC_STATUS_UNSUPPORTED; }