diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2024-06-15 12:34:29 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2024-06-21 15:32:30 -0400 |
commit | 7149bb1b6de2616f48b40f060ad8c887cb6a84d2 (patch) | |
tree | 8c4b5aa89a96d2d50806a02463ecab91868b017d /klippy/klippy.py | |
parent | ba529996ea18edf87de0bae41d8c458ffc07b889 (diff) | |
download | kutter-7149bb1b6de2616f48b40f060ad8c887cb6a84d2.tar.gz kutter-7149bb1b6de2616f48b40f060ad8c887cb6a84d2.tar.xz kutter-7149bb1b6de2616f48b40f060ad8c887cb6a84d2.zip |
error_mcu: Move formatting of mcu connect errors to error_mcu module
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/klippy.py')
-rw-r--r-- | klippy/klippy.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/klippy/klippy.py b/klippy/klippy.py index 17609b37..75ee6887 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -22,13 +22,6 @@ command to reload the config and restart the host software. Printer is halted """ -message_mcu_connect_error = """ -Once the underlying issue is corrected, use the -"FIRMWARE_RESTART" command to reset the firmware, reload the -config, and restart the host software. -Error configuring printer -""" - class Printer: config_error = configfile.error command_error = gcode.CommandError @@ -152,8 +145,10 @@ class Printer: util.dump_mcu_build() return except mcu.error as e: - logging.exception("MCU error during connect") - self._set_state("%s%s" % (str(e), message_mcu_connect_error)) + msg = "MCU error during connect" + logging.exception(msg) + self._set_state(msg) + self.send_event("klippy:notify_mcu_error", msg, {"error": str(e)}) util.dump_mcu_build() return except Exception as e: |