From: Martin Ling Date: Sat, 28 Dec 2013 23:35:09 +0000 (+0100) Subject: rigol-ds: Use correct live waveform size for Agilent DSO1000 series. X-Git-Tag: libsigrok-0.3.0~383 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=0d9f5a12cb32758b739d4c816964d186fc6a8b54;p=libsigrok.git rigol-ds: Use correct live waveform size for Agilent DSO1000 series. --- diff --git a/hardware/rigol-ds/api.c b/hardware/rigol-ds/api.c index cdd9e0ff..584a4fd6 100644 --- a/hardware/rigol-ds/api.c +++ b/hardware/rigol-ds/api.c @@ -864,8 +864,12 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data) return SR_ERR; if (set_cfg(sdi, ":STOP") != SR_OK) return SR_ERR; - } else - devc->analog_frame_size = DS2000_ANALOG_LIVE_WAVEFORM_SIZE; + } else { + if (devc->model->series == AGILENT_DSO1000) + devc->analog_frame_size = DSO1000_ANALOG_LIVE_WAVEFORM_SIZE; + else + devc->analog_frame_size = DS2000_ANALOG_LIVE_WAVEFORM_SIZE; + } devc->channel = devc->enabled_analog_probes->data; if (rigol_ds_capture_start(sdi) != SR_OK) return SR_ERR; diff --git a/hardware/rigol-ds/protocol.h b/hardware/rigol-ds/protocol.h index 264ca8b2..1c658ec6 100644 --- a/hardware/rigol-ds/protocol.h +++ b/hardware/rigol-ds/protocol.h @@ -31,6 +31,7 @@ #define DS1000_ANALOG_LIVE_WAVEFORM_SIZE 600 #define DS2000_ANALOG_LIVE_WAVEFORM_SIZE 1400 #define VS5000_ANALOG_LIVE_WAVEFORM_SIZE 2048 +#define DSO1000_ANALOG_LIVE_WAVEFORM_SIZE 600 /* Needs to be made configurable later */ #define DS2000_ANALOG_MEM_WAVEFORM_SIZE_1C 14000 #define DS2000_ANALOG_MEM_WAVEFORM_SIZE_2C 7000