Skip to content

Commit

Permalink
Extras: more attempts at better post processor reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
miklschmidt committed Dec 20, 2024
1 parent 9ed8873 commit 5164e46
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions configuration/klippy/ratos.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ def _interpret_output(data):
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 generator._N_Post processing skipped since you have allowed gcode from unknown generators.')
return False
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'])))
Expand All @@ -341,7 +340,8 @@ def _interpret_output(data):
self.gcode.run_script_from_command("SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=first_y VALUE=" + str(analysis_result['firstMoveY']))

self.console_echo(
'Post-processing completed', 'success',
'Post-processing completed',
'success',
f'Slicer: {data["payload"]["generator"]} v{data["payload"]["generatorVersion"]} ' +
f'_N_Used tools: T{", T".join(analysis_result["usedTools"])}' if "usedTools" in analysis_result else "" +
f'_N_Toolshifts: {analysis_result["toolChangeCount"]}' if "toolChangeCount" in analysis_result else ""
Expand Down Expand Up @@ -440,7 +440,7 @@ def _process_output(eventtime):
except Exception as e:
raise

return False
return success;


def get_gcode_file_info(self, filename):
Expand Down

0 comments on commit 5164e46

Please sign in to comment.