Temp: Start in delta mode when printing
This commit is contained in:
parent
c8a8f020af
commit
4c89eaf3e2
@ -21,21 +21,26 @@ class TemperaturePanel(ScreenPanel):
|
|||||||
def initialize(self, panel_name):
|
def initialize(self, panel_name):
|
||||||
self.preheat_options = self._screen._config.get_preheat_options()
|
self.preheat_options = self._screen._config.get_preheat_options()
|
||||||
logging.debug("Preheat options: %s" % self.preheat_options)
|
logging.debug("Preheat options: %s" % self.preheat_options)
|
||||||
self.show_preheat = True
|
|
||||||
self.grid = self._gtk.HomogeneousGrid()
|
self.grid = self._gtk.HomogeneousGrid()
|
||||||
self.grid.attach(self.create_left_panel(), 0, 0, 1, 1)
|
self.grid.attach(self.create_left_panel(), 0, 0, 1, 1)
|
||||||
self.grid.attach(self.create_right_panel(), 1, 0, 1, 1)
|
|
||||||
self.content.add(self.grid)
|
|
||||||
self.layout.show_all()
|
|
||||||
|
|
||||||
for x in self._printer.get_tools():
|
for x in self._printer.get_tools():
|
||||||
if x not in self.active_heaters:
|
if x not in self.active_heaters:
|
||||||
self.select_heater(None, x)
|
self.select_heater(None, x)
|
||||||
|
# When printing start in temp_delta mode and only select tools
|
||||||
|
logging.info(self._printer.get_state())
|
||||||
|
if self._printer.get_state() not in ["printing", "paused"]:
|
||||||
|
self.show_preheat = True
|
||||||
for h in self._printer.get_heaters():
|
for h in self._printer.get_heaters():
|
||||||
if h.startswith("temperature_sensor "):
|
if h.startswith("temperature_sensor "):
|
||||||
continue
|
continue
|
||||||
if h not in self.active_heaters:
|
if h not in self.active_heaters:
|
||||||
self.select_heater(None, h)
|
self.select_heater(None, h)
|
||||||
|
else:
|
||||||
|
self.show_preheat = False
|
||||||
|
self.grid.attach(self.create_right_panel(), 1, 0, 1, 1)
|
||||||
|
self.content.add(self.grid)
|
||||||
|
self.layout.show_all()
|
||||||
|
|
||||||
def create_right_panel(self):
|
def create_right_panel(self):
|
||||||
_ = self.lang.gettext
|
_ = self.lang.gettext
|
||||||
|
Loading…
x
Reference in New Issue
Block a user