servo: add get_status method
Signed-off-by: Janar Sööt <janar.soot@gmail.com>
This commit is contained in:
parent
efecc96427
commit
94f5fb3553
|
@ -50,6 +50,8 @@ class PrinterServo:
|
|||
toolhead = self.printer.lookup_object('toolhead')
|
||||
print_time = toolhead.get_last_move_time()
|
||||
self._set_pwm(print_time, self.initial_pwm_value)
|
||||
def get_status(self, eventtime):
|
||||
return {'value': self.last_value}
|
||||
def _set_pwm(self, print_time, value):
|
||||
if value == self.last_value and self.enable == self.last_enable:
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue