Merge pull request #6 from AliceGrey/testing

updateStatus on login
This commit is contained in:
Alice 2020-09-01 22:30:00 -05:00 committed by GitHub
commit cedace2f05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

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