mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-23 22:54:10 -06:00
gcode: Create new wrapper class for gcode command parameters
Instead of passing a dictionary to the command handlers, create a wrapper class and pass that class to the command handlers. This can simplify the command handler code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
1eb2d4da90
commit
ddb8311890
7 changed files with 103 additions and 60 deletions
|
@ -54,7 +54,7 @@ class HomingOverride:
|
|||
self.gcode.reset_last_position()
|
||||
# Perform homing
|
||||
kwparams = { 'printer': self.template.create_status_wrapper() }
|
||||
kwparams['params'] = params
|
||||
kwparams['params'] = params.get_command_parameters()
|
||||
try:
|
||||
self.in_script = True
|
||||
self.template.run_gcode_from_command(kwparams)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue