rigol-ds: Only protocol v3 adds trailing linefeeds to data blocks.

This commit is contained in:
Martin Ling 2014-01-22 04:49:57 +00:00 committed by Bert Vermeulen
parent a849c43a50
commit 2b399703d1
1 changed files with 3 additions and 1 deletions

View File

@ -575,9 +575,11 @@ SR_PRIV int rigol_ds_receive(int fd, int revents, void *cb_data)
if (devc->num_block_read == devc->num_block_bytes) {
sr_dbg("Block has been completed");
if (devc->format == FORMAT_IEEE488_2) {
if (devc->model->series->protocol >= PROTOCOL_V3) {
/* Discard the terminating linefeed */
sr_scpi_read_data(scpi, (char *)devc->buffer, 1);
}
if (devc->format == FORMAT_IEEE488_2) {
/* Prepare for possible next block */
devc->num_block_bytes = 0;
if (devc->data_source != DATA_SOURCE_LIVE)