Skip to content

Commit

Permalink
Update fan.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeanon committed Apr 3, 2024
1 parent edb6dd4 commit 49e9767
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion panels/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def add_fan(self, fan):
scale.set_has_origin(True)
scale.get_style_context().add_class("fan_slider")
scale.connect("button-release-event", self.set_fan_speed, fan)
scale.connect("format-value", KlippyGtk.format_scale_value, "HI")
scale.connect("format-value", self.format_scale_value, "HI")
fan_col.add(stop_btn)
fan_col.add(scale)
fan_col.add(max_btn)
Expand Down Expand Up @@ -131,3 +131,8 @@ def set_fan_speed(self, widget, event, fan):
def check_fan_speed(self, fan):
self.update_fan_speed(None, fan, self._printer.get_fan_speed(fan))
return False

def format_scale_value(self, scale, value, format_string):
logging.info("format:")
logging.info(format_string % value)
return format_string % value

0 comments on commit 49e9767

Please sign in to comment.