Skip to content

Commit

Permalink
unbify rmmu and idex spool joining feature
Browse files Browse the repository at this point in the history
  • Loading branch information
HelgeKeck committed Apr 16, 2024
1 parent 7d5102c commit 9fbdb75
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions klippy/rmmu.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def register_commands(self):
self.gcode.register_command('RMMU_FILAMENT_RUNOUT', self.cmd_RMMU_FILAMENT_RUNOUT, desc=(self.desc_RMMU_FILAMENT_RUNOUT))
self.gcode.register_command('RMMU_CALIBRATE_REVERSE_BOWDEN', self.cmd_RMMU_CALIBRATE_REVERSE_BOWDEN, desc=(self.desc_RMMU_CALIBRATE_REVERSE_BOWDEN))
self.gcode.register_command('RMMU_QUERY_SENSORS', self.cmd_RMMU_QUERY_SENSORS, desc=(self.desc_RMMU_QUERY_SENSORS))
self.gcode.register_command('RMMU_JOIN_FILAMENT', self.cmd_RMMU_JOIN_FILAMENT, desc=(self.desc_RMMU_JOIN_FILAMENT))
self.gcode.register_command('RMMU_JOIN_SPOOLS', self.cmd_RMMU_JOIN_SPOOLS, desc=(self.desc_RMMU_JOIN_SPOOLS))
self.gcode.register_command('RMMU_REMAP_TOOLHEADS', self.cmd_RMMU_REMAP_TOOLHEADS, desc=(self.desc_RMMU_REMAP_TOOLHEADS))

desc_RMMU_SELECT_FILAMENT = "Selects a filament by moving the idler to the correct position."
Expand Down Expand Up @@ -318,9 +318,9 @@ def cmd_RMMU_QUERY_SENSORS(self, param):
def cmd_RMMU_CALIBRATE_REVERSE_BOWDEN(self, param):
self.calibrate_reverse_bowden_length()

desc_RMMU_JOIN_FILAMENT = "Configures the spool join feature."
def cmd_RMMU_JOIN_FILAMENT(self, param):
self.join_filament(param)
desc_RMMU_JOIN_SPOOLS = "Configures the spool join feature."
def cmd_RMMU_JOIN_SPOOLS(self, param):
self.join_spools(param)

desc_RMMU_REMAP_TOOLHEADS = "Configures the toolhead mapping feature."
def cmd_RMMU_REMAP_TOOLHEADS(self, param):
Expand Down Expand Up @@ -1026,7 +1026,7 @@ def eject_filament(self, tool):
#####
# Join filament
#####
def join_filament(self, param):
def join_spools(self, param):
# parameter
parameter = param.get('SPOOLS', "").strip().replace(" ", "")

Expand Down Expand Up @@ -1116,14 +1116,14 @@ def echo_spool_join(self):
result += "Spools: " + ",".join(str(i) for i in spool_join) + "\n"
self.gcode.respond_raw(result)
return
result = "Joining deactivated!\n\n"
result = "Spool joining deactivated!\n\n"
result += "Deactivate joining with:\n"
result += "JOIN_FILAMENT SPOOLS=\n\n"
result += "JOIN_SPOOLS SPOOLS=\n\n"
result += "Join spool 1, 2 and 3 with:\n"
result += "JOIN_FILAMENT SPOOLS=1,2,3\n\n"
result += "JOIN_SPOOLS SPOOLS=1,2,3\n\n"
result += "Join spool 1 and 2 and then 0 and 3 with:\n"
result += "JOIN_FILAMENT SPOOLS=1,2\n"
result += "JOIN_FILAMENT SPOOLS=0,3\n"
result += "JOIN_SPOOLS SPOOLS=1,2\n"
result += "JOIN_SPOOLS SPOOLS=0,3\n"
self.gcode.respond_raw(result)

#####
Expand Down
6 changes: 3 additions & 3 deletions macros/rmmu.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ gcode:
{% endif %}


[gcode_macro JOIN_FILAMENT]
[gcode_macro JOIN_SPOOLS]
gcode:
# parameter
{% set spools = params.SPOOLS|default("") %}

DEBUG_ECHO PREFIX="JOIN_FILAMENT" MSG="SPOOLS={spools}"
DEBUG_ECHO PREFIX="JOIN_SPOOLS" MSG="SPOOLS={spools}"

{% if printer["rmmu"] is defined %}
RMMU_JOIN_FILAMENT SPOOLS={spools}
RMMU_JOIN_SPOOLS SPOOLS={spools}
{% endif %}


Expand Down

0 comments on commit 9fbdb75

Please sign in to comment.