output_pin: 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:05 +03:00 committed by Kevin O'Connor
parent e519ab2031
commit efecc96427
1 changed files with 2 additions and 0 deletions

View File

@ -39,6 +39,8 @@ class PrinterOutputPin:
self.gcode.register_mux_command("SET_PIN", "PIN", pin_name, self.gcode.register_mux_command("SET_PIN", "PIN", pin_name,
self.cmd_SET_PIN, self.cmd_SET_PIN,
desc=self.cmd_SET_PIN_help) desc=self.cmd_SET_PIN_help)
def get_status(self, eventtime):
return {'value': self.last_value}
cmd_SET_PIN_help = "Set the value of an output pin" cmd_SET_PIN_help = "Set the value of an output pin"
def cmd_SET_PIN(self, params): def cmd_SET_PIN(self, params):
value = self.gcode.get_float('VALUE', params, value = self.gcode.get_float('VALUE', params,