def change_extrusion(self, widget, dir): if dir == "+": self.extrusion += int(self.percent_delta) else: self.extrusion -= int(self.percent_delta) if self.extrusion < 0: self.extrusion = 0 self._screen._ws.klippy.gcode_script( KlippyGcodes.set_extrusion_rate(self.extrusion))
def change_extrusion(self, widget, direction): if direction == "+": self.extrusion += int(self.percent_delta) elif direction == "-": self.extrusion -= int(self.percent_delta) elif direction == "reset": self.extrusion = 100 self.extrusion = max(self.extrusion, 1) self._screen._ws.klippy.gcode_script( KlippyGcodes.set_extrusion_rate(self.extrusion))