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:
Kevin O'Connor 2020-04-22 12:40:32 -04:00
parent 1eb2d4da90
commit ddb8311890
7 changed files with 103 additions and 60 deletions

View file

@ -54,7 +54,8 @@ class ArcSupport:
g1_params['E'] = asE / len(coords)
if asF is not None:
g1_params['F'] = asF
self.gcode.cmd_G1(g1_params)
g1_gcmd = self.gcode.create_gcode_command("G1", "G1", g1_params)
self.gcode.cmd_G1(g1_gcmd)
# function planArc() originates from marlin plan_arc()
# https://github.com/MarlinFirmware/Marlin