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