Skip to content

Commit

Permalink
cosmetic changes temperature measurements
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-bochum committed Apr 21, 2024
1 parent e9263f1 commit 5b6db5e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
13 changes: 11 additions & 2 deletions sdm30xx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1602,14 +1602,23 @@ def get_funktion(self):
self.F4_Button.setProperty("text"," ")
elif funktion == "TEMP":
mess_art = 'Temperature'
self.F2_Button.setStyleSheet("background-color: #5a5a5a; color: #ffffff;")
self.F3_Button.setStyleSheet("background-color: #5a5a5a; color: #ffffff;")
self.F4_Button.setStyleSheet("background-color: #5a5a5a; color: #ffffff;")
self.dial.setRange(0,9)
self.dial.setProperty("toolTip", "Sensor " + str(TEMP_RDT_TYPE))
self.lcd_dial.setProperty("text", TEMP_RDT_TYPE[int(self.dial.value())])
bereich = TEMP_RDT_TYPE[int(self.dial.value())]
temp_unit = instr.ask("UNIT:TEMPerature?", encoding='utf-8')
funktion = "°"+temp_unit
if temp_unit == 'K':
if temp_unit == 'C':
funktion="°"+temp_unit
self.F2_Button.setStyleSheet("background-color: #5a5a5a; color: #80ff80;")
elif temp_unit == 'F':
funktion="°"+temp_unit
self.F3_Button.setStyleSheet("background-color: #5a5a5a; color: #80ff80;")
elif temp_unit == 'K':
funktion=temp_unit
self.F4_Button.setStyleSheet("background-color: #5a5a5a; color: #80ff80;")
# self.F1_Button.setVisible(False)
self.F1_Button.setProperty("text"," ")
# self.PTC_Button.setVisible(True)
Expand Down
13 changes: 11 additions & 2 deletions sdm30xx_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -1602,14 +1602,23 @@ def get_funktion(self):
self.F4_Button.setProperty("text"," ")
elif funktion == "TEMP":
mess_art = 'Temperature'
self.F2_Button.setStyleSheet("background-color: #5a5a5a; color: #ffffff;")
self.F3_Button.setStyleSheet("background-color: #5a5a5a; color: #ffffff;")
self.F4_Button.setStyleSheet("background-color: #5a5a5a; color: #ffffff;")
self.dial.setRange(0,9)
self.dial.setProperty("toolTip", "Sensor " + str(TEMP_RDT_TYPE))
self.lcd_dial.setProperty("text", TEMP_RDT_TYPE[int(self.dial.value())])
bereich = TEMP_RDT_TYPE[int(self.dial.value())]
temp_unit = instr.ask("UNIT:TEMPerature?", encoding='utf-8')
funktion = "°"+temp_unit
if temp_unit == 'K':
if temp_unit == 'C':
funktion="°"+temp_unit
self.F2_Button.setStyleSheet("background-color: #5a5a5a; color: #80ff80;")
elif temp_unit == 'F':
funktion="°"+temp_unit
self.F3_Button.setStyleSheet("background-color: #5a5a5a; color: #80ff80;")
elif temp_unit == 'K':
funktion=temp_unit
self.F4_Button.setStyleSheet("background-color: #5a5a5a; color: #80ff80;")
# self.F1_Button.setVisible(False)
self.F1_Button.setProperty("text"," ")
# self.PTC_Button.setVisible(True)
Expand Down

0 comments on commit 5b6db5e

Please sign in to comment.