Skip to content

Commit

Permalink
Extras: fix printability reasons formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
miklschmidt committed Dec 20, 2024
1 parent 5164e46 commit 3e8f722
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions configuration/klippy/ratos.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,18 +315,18 @@ def _interpret_output(data):
printability = data['payload']['printability']

if printability == 'NOT_SUPPORTED':
self.console_echo('Post-processing unsuccessful', 'error', data['payload']['printabilityReasons'] + "_N_You can allow unsupported slicers by adding the following to printer.cfg._N__N_[ratos]_N_allow_unsupported_slicer_versions: True_N_")
self.console_echo('Post-processing unsuccessful', 'error', data['payload']['printabilityReasons'] + "_N_You can allow unsupported slicers by adding the following to printer.cfg._N__N_[ratos]_N_allow_unsupported_slicer_versions: True_N__N_Reasons for failure:_N_ %s" % ("_N_".join(data['payload']['printabilityReasons'])))
return False

if printability == 'MUST_REPROCESS':
self.console_echo('Post-processing unsuccessful', 'error', '%s_N_File must be reprocessed before it can be printed, please slice and upload the unprocessed file again.' % ("_N_".join(data['payload']['printabilityReasons'])))
self.console_echo('Post-processing unsuccessful', 'error', 'File must be reprocessed before it can be printed, please slice and upload the unprocessed file again._N_Reasons for failure:_N_ %s' % ("_N_".join(data['payload']['printabilityReasons'])))
return False

if printability == "UNKNOWN" and data['payload']['generator'] == "unknown" and self.allow_unknown_gcode_generator:
self.console_echo('Post-processing skipped', 'warning', 'File contains gcode from an unknown/unidentified generator._N_Post processing skipped since you have allowed gcode from unknown generators.')

if printability != 'READY':
self.console_echo('Post-processing unsuccessful', 'error', '%s_N_File is not ready to be printed, please slice and upload the unprocessed file again.' % ("_N_".join(data['payload']['printabilityReasons'])))
self.console_echo('Post-processing unsuccessful', 'error', '%s_N_File is not ready to be printed, please slice and upload the unprocessed file again._N_Reasons for failure:_N_ %s' % ("_N_".join(data['payload']['printabilityReasons'])))
return False

analysis_result = data['payload']['analysisResult']
Expand Down

0 comments on commit 3e8f722

Please sign in to comment.