servo: add get_status method

Signed-off-by: Janar Sööt <janar.soot@gmail.com>
This commit is contained in:
Janar Sööt 2019-06-02 16:33:35 +03:00 committed by Kevin O'Connor
parent efecc96427
commit 94f5fb3553
1 changed files with 2 additions and 0 deletions

View File

@ -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