From: Uwe Hermann Date: Mon, 8 Feb 2016 20:03:40 +0000 (+0100) Subject: arachnid-labs-re-load-pro: Only support firmware >= 1.10. X-Git-Tag: libsigrok-0.5.0~562 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8084e0fa811df82b3a243c8ccc713a3af739a436;p=libsigrok.git arachnid-labs-re-load-pro: Only support firmware >= 1.10. The "on\n" and "off\n" commands require this. --- diff --git a/src/hardware/arachnid-labs-re-load-pro/api.c b/src/hardware/arachnid-labs-re-load-pro/api.c index dde81663..4dc594a5 100644 --- a/src/hardware/arachnid-labs-re-load-pro/api.c +++ b/src/hardware/arachnid-labs-re-load-pro/api.c @@ -75,6 +75,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) const char *conn, *serialcomm; char buf[100]; char *bufptr; + double version; devices = NULL; drvc = di->context; @@ -123,6 +124,13 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) return NULL; } + version = g_ascii_strtod(buf + 8, NULL); + if (version < 1.10) { + sr_info("Firmware >= 1.10 required (got %1.2f).", version); + serial_close(serial); + return NULL; + } + sdi = g_malloc0(sizeof(struct sr_dev_inst)); sdi->status = SR_ST_ACTIVE; sdi->vendor = g_strdup("Arachnid Labs");