Commit Graph

6 Commits

Author SHA1 Message Date
Yuri D'Elia
000f824e39 Increase E-jerk LA10->15 flattened zone
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.
2020-05-18 01:22:49 +02:00
Yuri D'Elia
0b666ee733 Parametrize LA limits and threshold values
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.
2020-04-28 17:31:42 +02:00
Yuri D'Elia
48c459e208 Increase the LA10->15 response 2020-04-12 02:58:44 +02:00
Yuri D'Elia
453f5dd874 Adjust E-jerk in LA10 compatibility mode
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).
2020-02-03 15:42:27 +01:00
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