commit
cedace2f05
|
@ -247,15 +247,17 @@ class KlipperPlugin(
|
|||
#-- Event Handler Plugin
|
||||
|
||||
def on_event(self, event, payload):
|
||||
if "UserLoggedIn" == event:
|
||||
self.updateStatus("info","Klipper: Standby")
|
||||
if "Connecting" == event:
|
||||
self.updateStatus("info", "Connecting ...")
|
||||
self.updateStatus("info", "Klipper: Connecting ...")
|
||||
elif "Connected" == event:
|
||||
self.updateStatus("info", "Connected to host")
|
||||
self.updateStatus("info", "Klipper: Connected to host")
|
||||
self.logInfo("Connected to host via {} @{}bps".format(payload["port"], payload["baudrate"]))
|
||||
elif "Disconnected" == event:
|
||||
self.updateStatus("info", "Disconnected from host")
|
||||
self.updateStatus("info", "Klipper: Disconnected from host")
|
||||
elif "Error" == event:
|
||||
self.updateStatus("error", "Error")
|
||||
self.updateStatus("error", "Klipper: Error")
|
||||
self.logError(payload["error"])
|
||||
|
||||
#-- GCODE Hook
|
||||
|
|
Loading…
Reference in New Issue