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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-11-21 13:00:12 -08:00
parent 5f76249923
commit ebe6704747

View File

@ -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;
}