After fixing some LA15 issues, the strenght of LA15 increased.
As such, re-adjust the conversion factor so that:
Start K10 => 0.01 (previous minimum was K15)
PLA K30 => 0.05 (was 0.07, optimal 0.045-0.06)
PETG K45 => 0.08 (was 0.13, optimal 0.07-0.11 depending on material/temp)
Increase the flattened response in the e-jerk conversion from the 1-4.5
region to 0.3-4.5 (same slope). This brings a 0.3 LA10 e-jerk to a 3.45
LA15 equivalent.
This will better handle the legacy Pretty PETG/CFPETG v3 profiles.
Allow the LA 1.5 MAX value to be configured in Configuration_adv.h.
Define a customizable LA10<>15 detection threshold in function of the
above limit.
Clamp the result of of the LA10->15 return value to always
respect the new LA_K_MAX.
When upgrading K values of a LA1.0 print, also adjust E-jerk settings
(<2) if permissible according to current accell limits. The same is also
true when jerk is set mid-print via 'M205 E'.
Existing values are always restored when switching to another
compatibility mode.
TODO: Since this is stateful, we will need to save the current print
mode / acceleration and jerk in the eeprom for this to survive a power
panic (see prusa3d#2456).
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.