]> sigrok.org Git - libsigrok.git/commitdiff
rigol-ds1xx2: fix channel numbers
authorBert Vermeulen <redacted>
Mon, 8 Apr 2013 10:01:00 +0000 (12:01 +0200)
committerBert Vermeulen <redacted>
Thu, 11 Apr 2013 16:32:08 +0000 (18:32 +0200)
Copyright bump, too.

hardware/rigol-ds1xx2/api.c
hardware/rigol-ds1xx2/protocol.c
hardware/rigol-ds1xx2/protocol.h

index d8561a76acea0057e77d4ef03145fd59ff763ad2..44b4777961dfce9874e05bae5d866dd059027182 100644 (file)
@@ -2,6 +2,7 @@
  * This file is part of the libsigrok project.
  *
  * Copyright (C) 2012 Martin Ling <martin-git@earth.li>
+ * Copyright (C) 2013 Bert Vermeulen <bert@biot.com>
  *
  * 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;
                        }
                }
index ecc517e2e5f41cf23527ee9d74e83a158a382269..19e402c386c4b60aff34c957061b1fd862107ad7 100644 (file)
@@ -2,6 +2,7 @@
  * This file is part of the libsigrok project.
  *
  * Copyright (C) 2012 Martin Ling <martin-git@earth.li>
+ * Copyright (C) 2013 Bert Vermeulen <bert@biot.com>
  *
  * 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
index 62970e728787b9af8dc8c5e670b689aea16e350a..d9afa3c09f4f6fa5442634cdba41ed48f6a19dfd 100644 (file)
@@ -2,6 +2,7 @@
  * This file is part of the libsigrok project.
  *
  * Copyright (C) 2012 Martin Ling <martin-git@earth.li>
+ * Copyright (C) 2013 Bert Vermeulen <bert@biot.com>
  *
  * 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