From: Mathieu Pilato Date: Thu, 9 Mar 2023 15:34:07 +0000 (+0100) Subject: fluke-dmm: Add support for Fluke 87/89 DMMs. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=e7f803f3e0bc0e984354e40b9d1982011dee7cd4;p=libsigrok.git fluke-dmm: Add support for Fluke 87/89 DMMs. --- diff --git a/src/hardware/fluke-dmm/api.c b/src/hardware/fluke-dmm/api.c index f533f1c5..4714997a 100644 --- a/src/hardware/fluke-dmm/api.c +++ b/src/hardware/fluke-dmm/api.c @@ -45,7 +45,7 @@ static const uint32_t devopts[] = { static const char *scan_conn[] = { /* 287/289 */ "115200/8n1", - /* 187/189 */ + /* 87/89/187/189 */ "9600/8n1", /* Scopemeter 190 series */ "1200/8n1", @@ -53,6 +53,8 @@ static const char *scan_conn[] = { }; static const struct flukedmm_profile supported_flukedmm[] = { + { FLUKE_87, "87", 100, 1000 }, + { FLUKE_89, "89", 100, 1000 }, { FLUKE_187, "187", 100, 1000 }, { FLUKE_189, "189", 100, 1000 }, { FLUKE_287, "287", 100, 1000 }, @@ -226,7 +228,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) static struct sr_dev_driver flukedmm_driver_info = { .name = "fluke-dmm", - .longname = "Fluke 18x/28x series DMMs", + .longname = "Fluke 8x/18x/28x series DMMs", .api_version = 1, .init = std_init, .cleanup = std_cleanup, diff --git a/src/hardware/fluke-dmm/protocol.c b/src/hardware/fluke-dmm/protocol.c index ecb581fd..de565e49 100644 --- a/src/hardware/fluke-dmm/protocol.c +++ b/src/hardware/fluke-dmm/protocol.c @@ -78,7 +78,7 @@ static void handle_qm_18x(const struct sr_dev_inst *sdi, char **tokens) *e++ = '\0'; if (sr_atof_ascii(tokens[1], &fvalue) != SR_OK) { /* Happens all the time, when switching modes. */ - sr_dbg("Invalid float."); + sr_dbg("Invalid float: '%s'", tokens[1]); return; } digits = count_digits(tokens[1]); @@ -466,7 +466,8 @@ static void handle_line(const struct sr_dev_inst *sdi) tokens = g_strsplit(devc->buf, ",", 0); if (tokens[0]) { - if (devc->profile->model == FLUKE_187 || devc->profile->model == FLUKE_189) { + if (devc->profile->model == FLUKE_87 || devc->profile->model == FLUKE_89 || + devc->profile->model == FLUKE_187 || devc->profile->model == FLUKE_189) { devc->expect_response = FALSE; handle_qm_18x(sdi, tokens); } else if (devc->profile->model == FLUKE_287 || devc->profile->model == FLUKE_289) { diff --git a/src/hardware/fluke-dmm/protocol.h b/src/hardware/fluke-dmm/protocol.h index 36ece3c9..b4f19936 100644 --- a/src/hardware/fluke-dmm/protocol.h +++ b/src/hardware/fluke-dmm/protocol.h @@ -29,7 +29,9 @@ /* Supported models */ enum { - FLUKE_187 = 1, + FLUKE_87 = 1, + FLUKE_89, + FLUKE_187, FLUKE_189, FLUKE_287, FLUKE_190,