]> sigrok.org Git - libsigrok.git/commitdiff
arachnid-labs-re-load-pro: Only support firmware >= 1.10.
authorUwe Hermann <redacted>
Mon, 8 Feb 2016 20:03:40 +0000 (21:03 +0100)
committerUwe Hermann <redacted>
Thu, 11 Feb 2016 13:42:50 +0000 (14:42 +0100)
The "on\n" and "off\n" commands require this.

src/hardware/arachnid-labs-re-load-pro/api.c

index dde8166365333c51e3e067933fac377e7b24f2d1..4dc594a58b52143b9f3a33ae7644b0babfb8eb09 100644 (file)
@@ -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");