GUI: Refactor send_command #4

Open
atse wants to merge 6 commits from gui_dev-refactor-send_command into gui_dev
2 changed files with 5 additions and 19 deletions
Showing only changes of commit 5c8d9c7cce - Show all commits

View File

@ -284,10 +284,7 @@
"value":20,
"step":0.1,
"format":"{value:.4f} °C",
"pid_autotune":[
"target_temp",
"ch"
]
"pid_autotune":"target_temp"
},
{
"name":"Test Current",
@ -300,10 +297,7 @@
2000
],
"suffix":"mA",
"pid_autotune":[
"test_current",
"ch"
]
"pid_autotune":"test_current"
},
{
"name":"Temperature Swing",
@ -312,10 +306,7 @@
"step":0.1,
"prefix":"±",
"format":"{value:.4f} °C",
"pid_autotune":[
"temp_swing",
"ch"
]
"pid_autotune":"temp_swing"
},
{
"name":"Lookback",
@ -323,10 +314,7 @@
"value":3.0,
"step":0.1,
"format":"{value:.4f} s",
"pid_autotune":[
"lookback",
"ch"
]
"pid_autotune":"lookback"
},
{
"name":"Run",

View File

@ -285,9 +285,7 @@ class MainWindow(QtWidgets.QMainWindow):
inner_param.setOpts(lock=False)
if "pid_autotune" in inner_param.opts:
auto_tuner_param = inner_param.opts["pid_autotune"][0]
if inner_param.opts["pid_autotune"][1] != "ch":
ch = inner_param.opts["pid_autotune"][1]
auto_tuner_param = inner_param.opts["pid_autotune"]
self.autotuners.set_params(auto_tuner_param, ch, new_value)
if "activaters" in inner_param.opts: