Skip to content

Commit

Permalink
Fixes small bug that didn't display diode's current range
Browse files Browse the repository at this point in the history
  • Loading branch information
Wannes-VanPuyvelde committed Apr 23, 2024
1 parent a7138a9 commit 8657381
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions serialcom/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,19 @@ 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
widget.setEnabled(True)
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
Expand Down

0 comments on commit 8657381

Please sign in to comment.