change lists to tuples
This commit is contained in:
parent
81e76b1815
commit
2956658104
@ -273,7 +273,7 @@ class Panel(MenuPanel):
|
|||||||
|
|
||||||
if "keypad" not in self.labels:
|
if "keypad" not in self.labels:
|
||||||
self.labels["keypad"] = Keypad(self._screen, self.change_target_temp, self.pid_calibrate, self.hide_numpad)
|
self.labels["keypad"] = Keypad(self._screen, self.change_target_temp, self.pid_calibrate, self.hide_numpad)
|
||||||
can_pid = self._printer.state not in ["printing", "paused"] \
|
can_pid = self._printer.state not in ("printing", "paused") \
|
||||||
and self._screen.printer.config[self.active_heater]['control'] == 'pid'
|
and self._screen.printer.config[self.active_heater]['control'] == 'pid'
|
||||||
self.labels["keypad"].show_pid(can_pid)
|
self.labels["keypad"].show_pid(can_pid)
|
||||||
self.labels["keypad"].clear()
|
self.labels["keypad"].clear()
|
||||||
|
@ -98,7 +98,7 @@ class Panel(ScreenPanel):
|
|||||||
self.scroll.show_all()
|
self.scroll.show_all()
|
||||||
|
|
||||||
def restart(self, widget, program):
|
def restart(self, widget, program):
|
||||||
if self._printer.state in ["printing", "paused"]:
|
if self._printer.state in ("printing", "paused"):
|
||||||
self._screen._confirm_send_action(widget, f'{_("Are you sure?")}\n\n'
|
self._screen._confirm_send_action(widget, f'{_("Are you sure?")}\n\n'
|
||||||
f'{_("Restart")}: {program}',
|
f'{_("Restart")}: {program}',
|
||||||
"machine.services.restart", {"service": program})
|
"machine.services.restart", {"service": program})
|
||||||
|
@ -29,7 +29,7 @@ class Panel(ScreenPanel):
|
|||||||
|
|
||||||
# When printing start in temp_delta mode and only select tools
|
# When printing start in temp_delta mode and only select tools
|
||||||
selection = []
|
selection = []
|
||||||
if self._printer.state not in ["printing", "paused"]:
|
if self._printer.state not in ("printing", "paused"):
|
||||||
self.show_preheat = True
|
self.show_preheat = True
|
||||||
selection.extend(self._printer.get_temp_devices())
|
selection.extend(self._printer.get_temp_devices())
|
||||||
elif extra:
|
elif extra:
|
||||||
@ -523,7 +523,7 @@ class Panel(ScreenPanel):
|
|||||||
|
|
||||||
if "keypad" not in self.labels:
|
if "keypad" not in self.labels:
|
||||||
self.labels["keypad"] = Keypad(self._screen, self.change_target_temp, self.pid_calibrate, self.hide_numpad)
|
self.labels["keypad"] = Keypad(self._screen, self.change_target_temp, self.pid_calibrate, self.hide_numpad)
|
||||||
can_pid = self._printer.state not in ["printing", "paused"] \
|
can_pid = self._printer.state not in ("printing", "paused") \
|
||||||
and self._screen.printer.config[self.active_heater]['control'] == 'pid'
|
and self._screen.printer.config[self.active_heater]['control'] == 'pid'
|
||||||
self.labels["keypad"].show_pid(can_pid)
|
self.labels["keypad"].show_pid(can_pid)
|
||||||
self.labels["keypad"].clear()
|
self.labels["keypad"].clear()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user