Skip to content

Commit

Permalink
Now heater/bed temp turns orange when heating
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcurti committed Jun 2, 2024
1 parent 96cf8d0 commit 42fedbe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
14 changes: 7 additions & 7 deletions klippy/extras/e3v3se_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ def HMI_Prepare(self):
self.pd.disable_all_heaters()

elif self.select_prepare.now == self.PREPARE_CASE_LANG: # Toggle Language
self.HMI_ToggleLanguage()
#self.HMI_ToggleLanguage()
self.Draw_Prepare_Menu()

def HMI_Control(self):
Expand Down Expand Up @@ -1784,7 +1784,7 @@ def HMI_PLAPreheatSetting(self):
self.select_PLA.now == self.PREHEAT_CASE_SAVE
): # Save PLA configuration
success = self.pd.save_settings()
self.HMI_AudioFeedback(success)
#self.HMI_AudioFeedback(success)

def HMI_TPUPreheatSetting(self):
encoder_state = self.get_encoder_state()
Expand Down Expand Up @@ -1857,7 +1857,7 @@ def HMI_TPUPreheatSetting(self):
self.select_TPU.now == self.PREHEAT_CASE_SAVE
): # Save PLA configuration
success = self.pd.save_settings()
self.HMI_AudioFeedback(success)
#self.HMI_AudioFeedback(success)

def HMI_ETemp(self):
encoder_state = self.get_encoder_state()
Expand Down Expand Up @@ -2221,14 +2221,14 @@ def Draw_Status_Area(self, with_update=True):
)

# nozzle temp area
self.lcd.draw_icon(True, self.ICON, self.icon_hotend_temp, 6, 262) #TODO: Change icon to heating icon when heating

self.lcd.draw_icon(True, self.ICON, self.icon_hotend_temp, 6, 262)
self.lcd.draw_int_value(
True,
True,
0,
self.lcd.font_8x8,
self.color_white,
self.color_yellow if self.pd.nozzleIsHeating() else self.color_white,
self.color_background_black,
3,
26,
Expand Down Expand Up @@ -2258,13 +2258,13 @@ def Draw_Status_Area(self, with_update=True):
)

# bed temp area
self.lcd.draw_icon(True, self.ICON, self.icon_bedtemp, 6, 294)
self.lcd.draw_icon(True, self.ICON, self.icon_bedtemp, 6, 294) #TODO: Change icon to heating icon when heating
self.lcd.draw_int_value(
True,
True,
0,
self.lcd.font_8x8,
self.color_white,
self.color_yellow if self.pd.bedIsHeating() else self.color_white,
self.color_background_black,
3,
26,
Expand Down
12 changes: 11 additions & 1 deletion klippy/extras/printerInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,17 @@ def preHeat(self, bedtemp, exttemp, toolnum=0):
# self.sendGCode('M104 T%s S%s\nM109 T%s S%s' % (toolnum, exttemp, toolnum, exttemp))
self.setBedTemp(bedtemp)
self.setExtTemp(exttemp)


def bedIsHeating(self):
bed = self.printer.lookup_object(
"heater_bed").get_status(self.reactor.monotonic())
return (int(bed["target"]) > int(bed["temperature"])) if bed else False

def nozzleIsHeating(self):
extruder = self.printer.lookup_object(
"extruder").get_status(self.reactor.monotonic())
return (int(extruder["target"]) > int(extruder["temperature"])) if extruder else False


def openAndPrintFile(self, filenum):
self.sendGCode('SDCARD_PRINT_FILE FILENAME="{}"'.format(self.fl[filenum]))
Expand Down

0 comments on commit 42fedbe

Please sign in to comment.