From: Bert Vermeulen Date: Mon, 8 Apr 2013 10:01:00 +0000 (+0200) Subject: rigol-ds1xx2: fix channel numbers X-Git-Tag: dsupstream~172 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=88e429c97f4fa482f8897c4795ad14f0afa96b56;p=libsigrok.git rigol-ds1xx2: fix channel numbers Copyright bump, too. --- diff --git a/hardware/rigol-ds1xx2/api.c b/hardware/rigol-ds1xx2/api.c index d8561a76..44b47779 100644 --- a/hardware/rigol-ds1xx2/api.c +++ b/hardware/rigol-ds1xx2/api.c @@ -2,6 +2,7 @@ * This file is part of the libsigrok project. * * Copyright (C) 2012 Martin Ling + * Copyright (C) 2013 Bert Vermeulen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -394,8 +395,6 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi) if (vdivs[i][0] != p || vdivs[i][1] != q) continue; devc->scale = (float)vdivs[i][0] / vdivs[i][1]; - rigol_ds1xx2_send_data(devc->fd, ":CHAN0:SCAL %.3f", - devc->scale); rigol_ds1xx2_send_data(devc->fd, ":CHAN1:SCAL %.3f", devc->scale); break; @@ -408,10 +407,10 @@ static int config_set(int id, GVariant *data, const struct sr_dev_inst *sdi) tmp_str = g_variant_get_string(data, NULL); for (i = 0; i < ARRAY_SIZE(coupling); i++) { if (!strcmp(tmp_str, coupling[i])) { - rigol_ds1xx2_send_data(devc->fd, ":CHAN0:COUP %s", - coupling[i]); rigol_ds1xx2_send_data(devc->fd, ":CHAN1:COUP %s", coupling[i]); + rigol_ds1xx2_send_data(devc->fd, ":CHAN2:COUP %s", + coupling[i]); break; } } diff --git a/hardware/rigol-ds1xx2/protocol.c b/hardware/rigol-ds1xx2/protocol.c index ecc517e2..19e402c3 100644 --- a/hardware/rigol-ds1xx2/protocol.c +++ b/hardware/rigol-ds1xx2/protocol.c @@ -2,6 +2,7 @@ * This file is part of the libsigrok project. * * Copyright (C) 2012 Martin Ling + * Copyright (C) 2013 Bert Vermeulen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/hardware/rigol-ds1xx2/protocol.h b/hardware/rigol-ds1xx2/protocol.h index 62970e72..d9afa3c0 100644 --- a/hardware/rigol-ds1xx2/protocol.h +++ b/hardware/rigol-ds1xx2/protocol.h @@ -2,6 +2,7 @@ * This file is part of the libsigrok project. * * Copyright (C) 2012 Martin Ling + * Copyright (C) 2013 Bert Vermeulen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by