Commit Graph

2 Commits

Author SHA1 Message Date
Yuri D'Elia
86696156af Improve K error checking, allow to manually reset the version
Properly check K independently for each version by delegating it to la10c_value()

Handle -1 as a special case to allow manual reset.
2019-12-30 14:31:39 +01:00
Yuri D'Elia
7b29ce29b4 Add a Linear Advance 1.0->1.5 compatibility layer
Allow existing gcode using LA10 to transparently take advantage of LA15
by using a simple linear conversion function based on experimental
results with the MK3 implementation of linear advance.

Autodetect LA10 values based on the first M900 instruction contained in
the print. In order to support printing mixed files without resetting
the printer we also reset the autodetection status when starting a new
SD print and/or when explicitly disabling LA.

Since we cannot reliably detect whether a new print is started when
printing via USB, also reset the detection status when homing in G28,
which is generally performed once at each print. Note that this doesn't
clear the previous K value, it only allows a subsequent M900 to provide
LA10 values when printed after a LA15 file.
2019-12-21 23:22:35 +01:00