From 8657381ac1666fddb8528f3b31c4d4f480327311 Mon Sep 17 00:00:00 2001 From: Wannes Van Puyvelde Date: Tue, 23 Apr 2024 12:29:01 +0200 Subject: [PATCH] Fixes small bug that didn't display diode's current range --- serialcom/sensor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/serialcom/sensor.py b/serialcom/sensor.py index 50152ec..84cd9d8 100644 --- a/serialcom/sensor.py +++ b/serialcom/sensor.py @@ -203,6 +203,9 @@ def handle_power_change(main_window, combobox, i): if selected_power_state == "On": # Diode if type == 1: + range_combo_box.clear() + range_combo_box.addItems(["7.5 V (10 µA)"]) + range_combo_box.setEnabled(False) # Disable range for col in range(2, 7): widget = main_window.sensor_ui.layout.itemAtPosition(row, col).widget() if col in [2, 6]: # Type and Display Units columns @@ -210,6 +213,9 @@ def handle_power_change(main_window, combobox, i): widget.setStyleSheet("") # Platinum RTD elif type == 2: + range_combo_box.clear() + range_combo_box.addItems(["1 kΩ (1 mA)"]) + range_combo_box.setEnabled(False) # Disable range for col in range(2, 7): widget = main_window.sensor_ui.layout.itemAtPosition(row, col).widget() if col in [2, 3, 6]: # Type, Current Reversal, and Display Units columns