fieldOfView / Cura-LinearAdvanceSettingPlugin

A Cura plugin that adds a Linear Advance Factor setting for use in start gcode snippets
GNU Affero General Public License v3.0
35 stars 15 forks source link

Documentation for Klipper users is incorrect #39

Closed psiberfunk closed 1 year ago

psiberfunk commented 2 years ago

The documentation has an invalid GCODE M900 conversion macro that doesn't work on current versions of klipper (maybe past versions too?). Instead, you should update the readme to this valid alternative:


[gcode_macro M900]
gcode:
    # Parameters
    {% set pa = params.K|float %}
    SET_PRESSURE_ADVANCE ADVANCE={pa}
psiberfunk commented 2 years ago

The existing suggested macro here is incorrect/doesn't comply with klipper's expected syntax:

[gcode_macro m900]
default_parameter_K: 0
gcode:
  SET_PRESSURE_ADVANCE ADVANCE={K}

Note that when you use the current suggested GCODE macro in printer.cfg in a modern klipper setup, klipper refuses to start with an error.. it doesn't like the line about "default_parameter_K: 0". I'm not sure if that syntax ever worked properly. Maybe it was valid in an older version of jinja2 ?

fieldOfView commented 2 years ago

See https://github.com/fieldOfView/Cura-LinearAdvanceSettingPlugin/pull/37 I am awaiting confirmation if this fix depends on the version of Klipper being used.

drphil3d commented 2 years ago

I'll do you one even better. This allows you to set Pressure Advance and Smooth Time (default is 0.06)

M900 K0 S0.6

[gcode_macro M900] description: Set Pressure Advance and Smooth Time gcode: SET_PRESSURE_ADVANCE ADVANCE={params.K|default(0)} SMOOTH_TIME={params.S|default(0.06)}

fieldOfView commented 1 year ago

I think this has been fixed by #37