]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/korad-kaxxxxp/api.c
korad-kaxxxxp: Add workaround for a Korad KA3005P issue.
[libsigrok.git] / src / hardware / korad-kaxxxxp / api.c
index 07fc9b41056a51d6ce488be676084c56959153b9..8753b1a55910dafe7ce1907bafbcd69e65c2e649 100644 (file)
@@ -50,10 +50,15 @@ static const uint32_t devopts[] = {
 
 static const struct korad_kaxxxxp_model models[] = {
        /* Device enum, vendor, model, ID reply, channels, voltage, current */
-       {VELLEMAN_LABPS_3005D, "Velleman", "LABPS3005D",
+       {VELLEMAN_PS3005D, "Velleman", "PS3005D",
+               "VELLEMANPS3005DV2.0", 1, {0, 31, 0.01}, {0, 5, 0.001}},
+       {VELLEMAN_LABPS3005D, "Velleman", "LABPS3005D",
                "VELLEMANLABPS3005DV2.0", 1, {0, 31, 0.01}, {0, 5, 0.001}},
        {KORAD_KA3005P, "Korad", "KA3005P",
                "KORADKA3005PV2.0", 1, {0, 31, 0.01}, {0, 5, 0.001}},
+       /* Sometimes the KA3005P has an extra 0x01 after the ID. */
+       {KORAD_KA3005P_0X01, "Korad", "KA3005P",
+               "KORADKA3005PV2.0\x01", 1, {0, 31, 0.01}, {0, 5, 0.001}},
        ALL_ZERO
 };
 
@@ -133,7 +138,8 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options)
                sr_err("Unknown model ID '%s' detected, aborting.", reply);
                return NULL;
        }
-       sr_dbg("Found: %s %s", models[model_id].vendor, models[model_id].name);
+       sr_dbg("Found: %s %s (idx %d, ID '%s').", models[model_id].vendor,
+               models[model_id].name, model_id, models[model_id].id);
 
        /* Init device instance, etc. */
        sdi = g_malloc0(sizeof(struct sr_dev_inst));