From: Uwe Hermann Date: Thu, 2 Jan 2014 13:25:06 +0000 (+0100) Subject: serial-dmm: Increase timeout when scanning for DMMs. X-Git-Tag: libsigrok-0.3.0~349 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=124c548de85346ff7ff9c6776a963b911559faac;p=libsigrok.git serial-dmm: Increase timeout when scanning for DMMs. We have to wait a bit longer than 1s for a valid DMM packet to arrive, since for various DMMs some modes (Hz/% for example) the packets will arrive a lot less often than in other modes. If the waiting period is too short detection of the DMM will fail. --- diff --git a/hardware/serial-dmm/api.c b/hardware/serial-dmm/api.c index 7091222f..b5892758 100644 --- a/hardware/serial-dmm/api.c +++ b/hardware/serial-dmm/api.c @@ -329,7 +329,7 @@ static GSList *sdmm_scan(const char *conn, const char *serialcomm, int dmm) /* Let's get a bit of data and see if we can find a packet. */ len = sizeof(buf); ret = serial_stream_detect(serial, buf, &len, dmms[dmm].packet_size, - dmms[dmm].packet_valid, 1000, + dmms[dmm].packet_valid, 3000, dmms[dmm].baudrate); if (ret != SR_OK) goto scan_cleanup;