static struct sr_dev_driver *di = &flukedmm_driver_info;
static const struct flukedmm_profile supported_flukedmm[] = {
- { FLUKE_187, "187", 100 },
- { FLUKE_287, "287", 100 },
+ { FLUKE_187, "187", 100, 1000 },
+ { FLUKE_287, "287", 100, 1000 },
+ { FLUKE_190, "199B", 1000, 3500 },
};
const char *modelname;
/* How often to poll, in ms. */
int poll_period;
+ /* If no response received, how long to wait before retrying. */
+ int timeout;
};
/* Private, per-device-instance driver context. */
now = g_get_monotonic_time() / 1000;
elapsed = now - devc->cmd_sent_at;
/* Send query command at poll_period interval, or after 1 second
- * has elapsed. This will make it recover from any out-of-sync
- * or temporary disconnect issues. */
+ * has elapsed. This will make it easier to recover from any
+ * out-of-sync or temporary disconnect issues. */
if ((devc->expect_response == FALSE && elapsed > devc->profile->poll_period)
- || elapsed > 1000) {
- sr_spew("Sending QM.");
+ || elapsed > devc->profile->timeout) {
if (serial_write(devc->serial, "QM\r", 3) == -1)
sr_err("Unable to send QM: %s.", strerror(errno));
devc->cmd_sent_at = now;