From: Soeren Apel Date: Wed, 27 Aug 2014 12:22:57 +0000 (+0200) Subject: yokogawa-dlm: Lower timeout to increase throughput and fix data acq bug X-Git-Tag: libsigrok-0.4.0~1068 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0028d5a1eeca4620a21a6f7374edd43ca1370aab;p=libsigrok.git yokogawa-dlm: Lower timeout to increase throughput and fix data acq bug --- diff --git a/src/hardware/yokogawa-dlm/api.c b/src/hardware/yokogawa-dlm/api.c index 030bf854..9a9c5fea 100644 --- a/src/hardware/yokogawa-dlm/api.c +++ b/src/hardware/yokogawa-dlm/api.c @@ -674,8 +674,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) devc->current_channel = devc->enabled_channels; dlm_channel_data_request(sdi); - /* Call our callback when data comes in or after 50ms. */ - sr_scpi_source_add(sdi->session, scpi, G_IO_IN, 10, + /* Call our callback when data comes in or after 5ms. */ + sr_scpi_source_add(sdi->session, scpi, G_IO_IN, 5, dlm_data_receive, (void *)sdi); return SR_OK; diff --git a/src/hardware/yokogawa-dlm/protocol.c b/src/hardware/yokogawa-dlm/protocol.c index 84ea966d..582da492 100644 --- a/src/hardware/yokogawa-dlm/protocol.c +++ b/src/hardware/yokogawa-dlm/protocol.c @@ -962,6 +962,7 @@ SR_PRIV int dlm_data_receive(int fd, int revents, void *cb_data) /* Don't care about return value here. */ dlm_acquisition_stop(sdi->conn); g_array_free(data, TRUE); + dlm_channel_data_request(sdi); return TRUE; }