From: Gerhard Sittig Date: Fri, 13 Jan 2017 18:44:26 +0000 (+0100) Subject: ols: also reflect successful identify response in diagnostics X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=163da55b9ce4de902c15654b02408cd139dace76;p=libsigrok.git ols: also reflect successful identify response in diagnostics The ols driver's scan() routine used to present the identification response to users when the scan failed, but would not when the scan succeeded. Since multiple response literals are supported, it's considered useful to see these, too, in case of successful device detection. Emit debug messages for developers' awareness. --- diff --git a/src/hardware/openbench-logic-sniffer/api.c b/src/hardware/openbench-logic-sniffer/api.c index 67bb230d..81a29fb6 100644 --- a/src/hardware/openbench-logic-sniffer/api.c +++ b/src/hardware/openbench-logic-sniffer/api.c @@ -161,6 +161,10 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) sr_hexdump_free(id); return NULL; + } else { + sr_dbg("Successful detection, got '%c%c%c%c' (0x%02x 0x%02x 0x%02x 0x%02x).", + buf[0], buf[1], buf[2], buf[3], + buf[0], buf[1], buf[2], buf[3]); } /* Definitely using the OLS protocol, check if it supports