Skip to content
Snippets Groups Projects
Commit 1933d3eb authored by Michael DM Dryden's avatar Michael DM Dryden
Browse files

Fix gain_liststore type mismatch.

parent 0db91a29
Branches
Tags
1 merge request!10Move to gtk3 and new command protocol
......@@ -29,23 +29,23 @@ except ImportError:
from errors import InputError, VarError, ErrorLogger
_logger = ErrorLogger(sender="dstat_adc_pot")
v1_1_gain = [(0, "100 Ω (15 mA FS)", 0),
(1, "300 Ω (5 mA FS)", 1),
(2, "3 kΩ (500 µA FS)", 2),
(3, "30 kΩ (50 µA FS)", 3),
(4, "300 kΩ (5 µA FS)", 4),
(5, "3 MΩ (500 nA FS)", 5),
(6, "30 MΩ (50 nA FS)", 6),
(7, "500 MΩ (3 nA FS)", 7)]
v1_1_gain = [(0, "100 Ω (15 mA FS)", "0"),
(1, "300 Ω (5 mA FS)", "1"),
(2, "3 kΩ (500 µA FS)", "2"),
(3, "30 kΩ (50 µA FS)", "3"),
(4, "300 kΩ (5 µA FS)", "4"),
(5, "3 MΩ (500 nA FS)", "5"),
(6, "30 MΩ (50 nA FS)", "6"),
(7, "500 MΩ (3 nA FS)", "7")]
v1_2_gain = [(0, "Bypass", 0),
(1, "100 Ω (15 mA FS)", 1),
(2, "3 kΩ (500 µA FS)", 2),
(3, "30 kΩ (50 µA FS)", 3),
(4, "300 kΩ (5 µA FS)", 4),
(5, "3 MΩ (500 nA FS)", 5),
(6, "30 MΩ (50 nA FS)", 6),
(7, "100 MΩ (15 nA FS)", 7)]
v1_2_gain = [(0, "Bypass", "0"),
(1, "100 Ω (15 mA FS)", "1"),
(2, "3 kΩ (500 µA FS)", "2"),
(3, "30 kΩ (50 µA FS)", "3"),
(4, "300 kΩ (5 µA FS)", "4"),
(5, "3 MΩ (500 nA FS)", "5"),
(6, "30 MΩ (50 nA FS)", "6"),
(7, "100 MΩ (15 nA FS)", "7")]
class adc_pot(object):
......@@ -142,7 +142,7 @@ class adc_pot(object):
if version[0] == 1:
if version[1] == 1:
for i in v1_1_gain:
self.gain_liststore.append(i)
self.gain_liststore.append(str(i))
elif version[1] >= 2:
for i in v1_2_gain:
self.gain_liststore.append(i)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment