Skip to content

Commit

Permalink
PLUGIN: add DONT_PROCESS_GCODE_FOR_NEXT_PRINT command to Ratos.py (#46)
Browse files Browse the repository at this point in the history
* PLUGIN: add DONT_PROCESS_GCODE_FOR_NEXT_PRINT command to Ratos.py

* PLUGIN: _RATOS_END_PRINT added to ratos.py

* PLUGIN: simplified resetting of bypass_post_processing

* MACRO: removed unneeded _RATOS_END_PRINT call from  END_PRINT

* PLUGIN: renamed to BYPASS_GCODE_PROCESSING
  • Loading branch information
HelgeKeck authored Dec 21, 2024
1 parent e5101b6 commit 28cf93c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions configuration/klippy/ratos.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def register_commands(self):
self.gcode.register_command('BEACON_APPLY_SCAN_COMPENSATION', self.cmd_BEACON_APPLY_SCAN_COMPENSATION, desc=(self.desc_BEACON_APPLY_SCAN_COMPENSATION))
self.gcode.register_command('TEST_PROCESS_GCODE_FILE', self.cmd_TEST_PROCESS_GCODE_FILE, desc=(self.desc_TEST_PROCESS_GCODE_FILE))
self.gcode.register_command('ALLOW_UNKNOWN_GCODE_GENERATOR', self.cmd_ALLOW_UNKNOWN_GCODE_GENERATOR, desc=(self.desc_ALLOW_UNKNOWN_GCODE_GENERATOR))
self.gcode.register_command('BYPASS_GCODE_PROCESSING ', self.cmd_BYPASS_GCODE_PROCESSING , desc=(self.desc_BYPASS_GCODE_PROCESSING ))
self.gcode.register_command('_SYNC_GCODE_POSITION', self.cmd_SYNC_GCODE_POSITION, desc=(self.desc_SYNC_GCODE_POSITION))

def register_command_overrides(self):
Expand Down Expand Up @@ -126,6 +127,10 @@ def cmd_SYNC_GCODE_POSITION(self, gcmd):
def cmd_ALLOW_UNKNOWN_GCODE_GENERATOR(self, gcmd):
self.allow_unknown_gcode_generator = True

desc_BYPASS_GCODE_PROCESSING = "Disables postprocessor for the next print."
def cmd_BYPASS_GCODE_PROCESSING (self, gcmd):
self.bypass_post_processing = True

desc_TEST_PROCESS_GCODE_FILE = "Test the G-code post-processor for IDEX and RMMU, only for debugging purposes"
def cmd_TEST_PROCESS_GCODE_FILE(self, gcmd):
dual_carriage = self.dual_carriage
Expand Down Expand Up @@ -199,6 +204,7 @@ def cmd_PROCESS_GCODE_FILE(self, gcmd):
self.gcode.run_script_from_command("SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=first_x VALUE=-1")
self.gcode.run_script_from_command("SET_GCODE_VARIABLE MACRO=START_PRINT VARIABLE=first_y VALUE=-1")
if self.bypass_post_processing:
self.bypass_post_processing = self.config.getboolean('bypass_post_processing', False)
self.console_echo('Bypassing post-processing', 'info', 'Configuration option `bypass_post_processing` is set to true. Bypassing post-processing...')
if isIdex:
self.console_echo('Bypassing post-processing on IDEX machines is not recommended', 'warning', '_N_'.join([
Expand Down

0 comments on commit 28cf93c

Please sign in to comment.