From: Frank Stettner Date: Thu, 21 Mar 2019 22:04:58 +0000 (+0100) Subject: korad-kaxxxxp: Add another KA3005P with 0xBC as extra byte in the model ID. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=1c0e1baaaaf0314f49470fb49a4f5e6ddc0ba1a1;p=libsigrok.git korad-kaxxxxp: Add another KA3005P with 0xBC as extra byte in the model ID. --- diff --git a/src/hardware/korad-kaxxxxp/api.c b/src/hardware/korad-kaxxxxp/api.c index 5e4fcef9..32f352a5 100644 --- a/src/hardware/korad-kaxxxxp/api.c +++ b/src/hardware/korad-kaxxxxp/api.c @@ -55,6 +55,9 @@ static const struct korad_kaxxxxp_model models[] = { /* 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}}, + /* Sometimes the KA3005P has an extra 0xBC after the ID. */ + {KORAD_KA3005P_0XBC, "Korad", "KA3005P", + "KORADKA3005PV2.0\xBC", 1, {0, 31, 0.01}, {0, 5, 0.001}}, {KORAD_KD3005P, "Korad", "KD3005P", "KORAD KD3005P V2.0", 1, {0, 31, 0.01}, {0, 5, 0.001}}, {KORAD_KD3005P_V20_NOSP, "Korad", "KD3005P", @@ -128,7 +131,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) sr_dbg("Received: %d, %s", i, reply); model_id = -1; for (i = 0; models[i].id; i++) { - if (!strcmp(models[i].id, reply)) + if (!g_strcmp0(models[i].id, reply)) model_id = i; } if (model_id < 0) { diff --git a/src/hardware/korad-kaxxxxp/protocol.h b/src/hardware/korad-kaxxxxp/protocol.h index 362c73f2..7082b153 100644 --- a/src/hardware/korad-kaxxxxp/protocol.h +++ b/src/hardware/korad-kaxxxxp/protocol.h @@ -36,6 +36,7 @@ enum { VELLEMAN_LABPS3005D, KORAD_KA3005P, KORAD_KA3005P_0X01, + KORAD_KA3005P_0XBC, KORAD_KD3005P, KORAD_KD3005P_V20_NOSP, RND_320K30PV,