From: Alexandru Gagniuc Date: Fri, 30 Nov 2012 18:40:17 +0000 (-0600) Subject: metex14: Print contents of received packet. X-Git-Tag: dsupstream~512 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e82d7dbc202794dc30abdb4e50cfb4507f49025e;p=libsigrok.git metex14: Print contents of received packet. The packet is an ASCII string. We can simply print the raw packet data. Signed-off-by: Alexandru Gagniuc --- diff --git a/hardware/common/dmm/metex14.c b/hardware/common/dmm/metex14.c index e6b9b983..9364dcb0 100644 --- a/hardware/common/dmm/metex14.c +++ b/hardware/common/dmm/metex14.c @@ -291,6 +291,9 @@ SR_PRIV int sr_metex14_parse(const uint8_t *buf, float *floatval, info_local = (struct metex14_info *)info; + /* Don't print byte 13. That one contains the carriage return. */ + sr_dbg("DMM packet: \"%.13s\"", buf); + if ((ret = parse_value(buf, floatval)) != SR_OK) { sr_err("Error parsing value: %d.", ret); return ret;