Skip to content

Commit

Permalink
Always enable PID
Browse files Browse the repository at this point in the history
  • Loading branch information
kingofpayne committed Dec 7, 2023
1 parent e135f76 commit 6428eea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
1 change: 1 addition & 0 deletions silicontoaster/silicontoaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(self, dev=None, sn=None):
2.57379247e00,
]
self._software_limit = None
self.set_adc_control_on_off(True)

@staticmethod
def convert(value: Union[float, int], calibration: list[float]) -> float:
Expand Down
11 changes: 0 additions & 11 deletions silicontoaster/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,6 @@ def __init__(self, dev):
w = QPushButton("Refresh")
w.clicked.connect(self.refresh_pid_ex)
hbox.addWidget(w)
w = self.adc_control_on_off_button = QPushButton("Activate ADCControl")
w.setCheckable(True)
hbox.addWidget(w)
w.setChecked(self.silicon_toaster.adc_control_on_off())
w.toggled.connect(self.adc_control_on_off)

self.advanced.setVisible(False)

Expand All @@ -280,12 +275,6 @@ def __init__(self, dev):
timer.timeout.connect(self.refresh_voltage)
timer.start()

def adc_control_on_off(self, value: bool):
"""Turn-on or off ADC Control."""
self.silicon_toaster.set_adc_control_on_off(value)
print("ADC Control is now", is_on := self.silicon_toaster.adc_control_on_off())
self.adc_control_on_off_button.setChecked(is_on)

def refresh_pid(self):
kp, ki, kd, timetick = self.silicon_toaster.get_adc_control_pid(
self.flash.isChecked()
Expand Down

0 comments on commit 6428eea

Please sign in to comment.