forked from M-Labs/thermostat
linuswck
726f1a3657
- Bugs fix: 1. Params Tree user input will not get overwritten by incoming report thermostat_data_model. 2. PID Autotune Sampling Period is now set according to Thermostat sampling interval 3. PID Autotune won't get stuck in Fail State 4. Various types disconnection related Bugs 5. Number of Samples stored in the plot cannot be set 6. Limit the max settable output current to be 2000mA - Improvement: 1. Params Tree settings can be changed with external json 2. Use a Tab system to show a single channel of config instead of two 3. Expose PID Autotune lookback params 4. Icon is changed to Artiq logo - Restructure: 1. Restructure the code to follow Model-View-Delegate Design Pattern
22 lines
698 B
Python
22 lines
698 B
Python
from PyQt6 import QtWidgets, QtGui
|
|
|
|
|
|
class plot_options_menu(QtWidgets.QMenu):
|
|
def __init__(self, max_samples=1000):
|
|
super().__init__()
|
|
self.setTitle("Plot Settings")
|
|
|
|
clear = QtGui.QAction("Clear graphs", self)
|
|
self.addAction(clear)
|
|
self.clear = clear
|
|
|
|
self.samples_spinbox = QtWidgets.QSpinBox()
|
|
self.samples_spinbox.setRange(2, 100000)
|
|
self.samples_spinbox.setSuffix(" samples")
|
|
self.samples_spinbox.setValue(max_samples)
|
|
|
|
limit_samples = QtWidgets.QWidgetAction(self)
|
|
limit_samples.setDefaultWidget(self.samples_spinbox)
|
|
self.addAction(limit_samples)
|
|
self.limit_samples = limit_samples
|