Skip to content

Commit

Permalink
Add texts to error yaml for CONNECT dialog codes.
Browse files Browse the repository at this point in the history
+ escaping '\"' in the texts strings while generating the header in
  python.
  • Loading branch information
HelclM committed Mar 21, 2024
1 parent 7ff9767 commit 895dd57
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 69 deletions.
2 changes: 1 addition & 1 deletion generate_buddy_headers.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def generate_header_file(yaml_file_name, header_file_name, printer_id, printer_c
"id": err_id,
"code": err_code,
"title": err["title"],
"text": err["text"].replace("\n", "\\n"),
"text": err["text"].translate(str.maketrans({"\n": "\\n", "\"": "\\\""})),
"extra_text": extra_text
}

Expand Down
159 changes: 91 additions & 68 deletions yaml/buddy-error-codes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -791,215 +791,238 @@ Errors:
approved: true

- code: "XX801"
title: ""
text: ""
title: "Warning"
text: "Please complete Calibrations & Tests before using the printer."
id: "PRINT_PREVIEW_UNFINISHED_SELFTEST"
type: "CONNECT"

- code: "XX802"
title: ""
text: ""
printers: [MINI]
title: "Warning"
text: "New FW available"
id: "PRINT_PREVIEW_NEW_FW"
type: "CONNECT"

- code: "XX802"
printers: [MK4, XL, MK3.5, iX]
title: "Warning"
text: "New firmware available"
id: "PRINT_PREVIEW_NEW_FW"
type: "CONNECT"

- code: "XX803"
title: ""
text: ""
title: "Warning"
text: "The G-code isn't fully compatible"
id: "PRINT_PREVIEW_WRONG_PRINTER"
type: "CONNECT"

- code: "XX804"
title: ""
text: ""
title: "Warning"
text: "Filament not detected. Load filament now?\nSelect NO to cancel the print.\nSelect DISABLE FS to disable the filament sensor and continue print."
id: "PRINT_PREVIEW_NO_FILAMENT"
type: "CONNECT"

- code: "XX805"
title: ""
text: ""
printers: [MINI]
title: "Warning"
text: "This G-code was set up for another filament type."
id: "PRINT_PREVIEW_WRONG_FILAMENT"
type: "CONNECT"

- code: "XX805"
printers: [MK4, XL, MK3.5, iX]
title: "Warning"
text: "A filament specified in the G-code is either not loaded or wrong type."
id: "PRINT_PREVIEW_WRONG_FILAMENT"
type: "CONNECT"

- code: "XX806"
printers: [MK4, MK3.5]
title: ""
text: ""
title: "Warning"
text: "Filament detected. Unload filament now? Select NO to start the print with the currently loaded filament."
id: "PRINT_PREVIEW_MMU_FILAMENT_INSERTED"
type: "CONNECT"

- code: "XX807"
title: ""
text: ""
title: "File error"
#TODO what about this one? It is dynamically generated.
text: "File error"
id: "PRINT_PREVIEW_FILE_ERROR"
type: "CONNECT"

- code: "XX808"
title: ""
text: ""
text: "The heatbed cooled down during the power outage, printed object might have detached. Inspect it before continuing."
id: "POWER_PANIC_COLD_BED"
type: "CONNECT"

- code: "XX809"
title: ""
text: ""
id: "CRASH_RECOVERY_AXIS_NOK"
text: "Length of an axis is too long.\nMotor current is too low, probably.\nRetry check, pause or resume the print?"
id: "CRASH_RECOVERY_AXIS_LONG"
type: "CONNECT"

- code: "XX810"
title: ""
text: ""
id: "CRASH_RECOVERY_REPEATED_CRASH"
text: "Length of an axis is too short.\nThere's an obstacle or bearing issue.\nRetry check, pause or resume the print?"
id: "CRASH_RECOVERY_AXIS_SHORT"
type: "CONNECT"

- code: "XX811"
title: ""
text: ""
text: "Repeated collision has been detected.\nDo you want to resume or pause the print?"
id: "CRASH_RECOVERY_REPEATED_CRASH"
type: "CONNECT"

- code: "XX812"
title: ""
text: "Unable to home the printer.\nDo you want to try again?"
id: "CRASH_RECOVERY_HOME_FAIL"
type: "CONNECT"

- code: "XX812"
- code: "XX813"
printers: [XL]
title: ""
text: ""
text: "Toolchanger problem has been detected.\nPark all tools to docks\nand leave the carriage free."
id: "CRASH_RECOVERY_TOOL_PICKUP"
type: "CONNECT"

- code: "XX813"
- code: "XX814"
printers: [MK4, XL, MK3.5]
title: ""
text: ""
title: "Tool mapping"
text: "Changes of mapping available only in the Printer UI. Select Print to start the print with defaults."
id: "PRINT_PREVIEW_TOOLS_MAPPING"
type: "CONNECT"

- code: "XX814"
- code: "XX815"
printers: [MK4, MK3.5]
title: ""
text: ""
text: "Waiting for user input"
id: "MMU_LOAD_UNLOAD_ERROR"
type: "CONNECT"

- code: "XX815"
- code: "XX816"
title: ""
text: ""
text: "Print fan not spinning. Check it for possible debris, then inspect the wiring."
id: "PRINT_FAN_ERROR"
type: "CONNECT"

- code: "XX816"
- code: "XX817"
title: ""
text: ""
text: "Heating disabled due to 30 minutes of inactivity."
id: "HEATERS_TIMEOUT"
type: "CONNECT"

- code: "XX817"
- code: "XX818"
title: ""
text: ""
text: "Measured temperature is not matching expected value. Check the thermistor is in contact with hotend. In case of damage, replace it."
id: "HOTEND_TEMP_DISCREPANCY"
type: "CONNECT"

- code: "XX818"
- code: "XX819"
title: ""
text: ""
text: "Heating disabled due to 30 minutes of inactivity."
id: "NOZZLE_TIMEOUT"
type: "CONNECT"

- code: "XX819"
- code: "XX820"
title: ""
text: ""
text: "Steppers disabled due to inactivity."
id: "STEPPERS_TIMEOUT"
type: "CONNECT"

- code: "XX820"
- code: "XX821"
title: ""
text: ""
text: "USB drive or file error, the print is now paused. Reconnect the drive."
id: "USB_FLASH_DISK_ERROR"
type: "CONNECT"

- code: "XX821"
- code: "XX822"
title: ""
text: ""
text: "Heatbreak thermistor is disconnected. Inspect the wiring."
id: "HEATBREAK_THERMISTOR_FAIL"
type: "CONNECT"

- code: "XX822"
- code: "XX823"
printers: [XL, MK3.5]
title: ""
text: ""
text: "Nozzle doesn't seem to have round cross section. Make sure it is clean and perpendicular to the bed."
id: "NOZZLE_DOES_NOT_HAVE_ROUND_SECTION"
type: "CONNECT"

- code: "XX823"
- code: "XX824"
title: ""
text: ""
text: "G-Code transfer running too slow. Check your network for issues or use different USB drive. Press Continue to resume printing."
id: "NOT_DOWNLOADED"
type: "CONNECT"

- code: "XX824"
- code: "XX825"
title: ""
text: ""
text: "MCU in Buddy is overheated. Any higher will result in fatal error."
id: "BUDDY_MCU_MAX_TEMP"
type: "CONNECT"

- code: "XX825"
- code: "XX826"
printers: [XL]
title: ""
text: ""
text: "MCU in Dwarf is overheated. Any higher will result in fatal error."
id: "DWARF_MCU_MAX_TEMP"
type: "CONNECT"

- code: "XX826"
- code: "XX827"
printers: [iX, XL]
title: ""
text: ""
text: "MCU in Modular Bed is overheated. Any higher will result in fatal error."
id: "MOD_BED_MCU_MAX_TEMP"
type: "CONNECT"

- code: "XX827"
- code: "XX828"
title: ""
text: ""
text: "Hotend fan not spinning. Check it for possible debris, then inspect the wiring."
id: "HOTEND_FAN_ERROR"
type: "CONNECT"

- code: "XX828"
title: ""
text: ""
- code: "XX829"
title: "Filament runout"
text: "Filament runout during print, please insert new one."
id: "FILAMENT_RUNOUT"
type: "CONNECT"

- code: "XX829"
- code: "XX830"
printers: [XL]
title: ""
text: ""
text: "Enclosure fan not spinning. Check it for possible debris, then inspect the wiring."
id: "ENCLOSURE_FAN_ERROR"
type: "CONNECT"

- code: "XX830"
- code: "XX831"
printers: [XL]
title: ""
text: ""
text: "The HEPA filter is nearing the end of its life span (100 hours of printing time remaining). We recommend purchasing a new one. Visit prusa.io/xl-filter for more information."
id: "ENCLOSURE_FILTER_EXPIRATION_WARNING"
type: "CONNECT"

- code: "XX831"
- code: "XX832"
printers: [XL]
title: ""
text: ""
text: "The HEPA filter has expired. Change the HEPA filter before your next print. Visit prusa.io/xl-filter for more information."
id: "ENCLOSURE_FILTER_EXPIRATION"
type: "CONNECT"
- code: "XX832"
- code: "XX833"
printers: [iX, MK4, MK3.5, MINI, XL]
title: ""
text: ""
text: "Bed leveling failed. Try again?"
id: "PROBING_FAILED"
type: "CONNECT"
- code: "XX833"
- code: "XX834"
printers: [iX, MK4, MK3.5, XL]
title: ""
text: ""
text: "Nozzle cleaning failed."
id: "NOZZLE_CLEANING_FAILED"
type: "CONNECT"
- code: "XX834"
- code: "XX835"
printers: [iX, MK4, MK3.5, MINI, XL]
title: ""
text: ""
text: "Waiting for the user. Press \"Resume\" once the printer is ready."
id: "QUICK_PAUSE"
type: "CONNECT"

0 comments on commit 895dd57

Please sign in to comment.