Move Postfilter Rate setting to Thermostat Config

This commit is contained in:
atse 2024-01-02 11:47:35 +08:00
parent 4582a8818c
commit 3b13881429

View File

@ -255,8 +255,6 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
{'name': 'R₀', 'type': 'float', 'value': 10000, 'step': 1, 'siPrefix': True, 'suffix': 'Ω', {'name': 'R₀', 'type': 'float', 'value': 10000, 'step': 1, 'siPrefix': True, 'suffix': 'Ω',
'param': ('s-h', ch, 'r0')}, 'param': ('s-h', ch, 'r0')},
{'name': 'B', 'type': 'float', 'value': 3950, 'step': 1, 'suffix': 'K', 'decimals': 4, 'param': ('s-h', ch, 'b')}, {'name': 'B', 'type': 'float', 'value': 3950, 'step': 1, 'suffix': 'K', 'decimals': 4, 'param': ('s-h', ch, 'b')},
]},
{'name': 'Postfilter Config', 'expanded': False, 'type': 'group', 'children': [
{'name': 'Postfilter Rate', 'type': 'list', 'value': 16.67, 'param': ('postfilter', ch, 'rate'), {'name': 'Postfilter Rate', 'type': 'list', 'value': 16.67, 'param': ('postfilter', ch, 'rate'),
'limits': {'Off': None, '16.67 Hz': 16.67, '20 Hz': 20.0, '21.25 Hz': 21.25, '27 Hz': 27.0}}, 'limits': {'Off': None, '16.67 Hz': 16.67, '20 Hz': 20.0, '21.25 Hz': 21.25, '27 Hz': 27.0}},
]}, ]},
@ -874,7 +872,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
for postfilter_params in postfilter_data: for postfilter_params in postfilter_data:
channel = postfilter_params["channel"] channel = postfilter_params["channel"]
with QSignalBlocker(self.params[channel]): with QSignalBlocker(self.params[channel]):
self.params[channel].child("Postfilter Config", "Postfilter Rate").setValue(postfilter_params["rate"]) self.params[channel].child("Thermistor Config", "Postfilter Rate").setValue(postfilter_params["rate"])
async def coro_main(): async def coro_main():