From: Gerhard Sittig Date: Sat, 22 May 2021 12:12:22 +0000 (+0200) Subject: fluke-45: drop serial port echo test, was disabled for years X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=a36b21fb89ca56a92cd27b3098ef391fa61adbc3;p=libsigrok.git fluke-45: drop serial port echo test, was disabled for years The Fluke 45 driver's ECHO_TEST broke other people's SCPI device identification and was disabled in 2018-11. Remove the dead code which is impossible to resurrect. Its purpose was questionable to begin with. Should users be affected, then the echo would break the identification phase. The check cannot be done before identification without affecting other connected devices, cannot be done after the identification either when that very identification systematically fails. Should a user meet this condition then applications' logs are available to see why *IDN? fails, assuming that users are not aware of their serial port or device configuration. The request's reflection in the place of a response gives a strong hint. --- diff --git a/src/hardware/fluke-45/api.c b/src/hardware/fluke-45/api.c index 2e80b6bf..96c8a1b3 100644 --- a/src/hardware/fluke-45/api.c +++ b/src/hardware/fluke-45/api.c @@ -31,12 +31,6 @@ #include "scpi.h" #include "protocol.h" -/* - * This test violates the SCPI protocol, and confuses other devices. - * Disable it for now, until a better location was found. - */ -#define ECHO_TEST 0 - static const uint32_t scanopts[] = { SR_CONF_CONN, SR_CONF_SERIALCOMM, @@ -68,21 +62,6 @@ static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi) unsigned int i; const struct fluke_scpi_dmm_model *model = NULL; gchar *channel_name; -#if ECHO_TEST - char *response; -#endif - -#if ECHO_TEST - /* Test for serial port ECHO enabled. */ - response = NULL; - sr_scpi_get_string(scpi, "ECHO-TEST", &response); - if (response && strcmp(response, "ECHO-TEST") == 0) { - sr_err("Serial port ECHO is ON. Please turn it OFF!"); - g_free(response); - return NULL; - } - g_free(response); -#endif /* Get device IDN. */ if (sr_scpi_get_hw_id(scpi, &hw_info) != SR_OK) {