Take advantage of the NTC thermistor found on the Einsy as an additional
safety measure, following the steps of the other MIN/MAXTEMP errors.
Introduce two configurable params AMBIENT_MINTEMP and AMBIENT_MAXTEMP
in the variant defines and set them for the MK3/MK3S to -30/+100
respectively.
AMBIENT_MINTEMP is primarily intended to catch a defective board
thermistor (to ensure MAXTEMP would be properly triggered) and thus the
trigger temperature is set just above the sensing limit and well below
the operating range.
AMBIENT_MAXTEMP is set at 100C, which is instead 20C above the maximum
recommended operating temperature of the Einsy. The NTC thermistor is
located just above the main power connector on the bottom of the board,
and could also help in detecting a faulty connection which can result in
rapid overheating of the contacts.
As for MAXTEMP, we cut power to the heaters, print fan and motors to
reduce power draw. Resume is not possible except by resetting the
printer, since the user is highly advised to inspect the board for
problems before attempting to continue.
If you're using flow to correct for an incorrect source diameter, which
is probably the main usage when using the LCD, then LA shouldn't be
adjusted.
It's still unclear what the effect of M221 in gcode should be regarding
overall extrusion width. If M221 means "thicker lines", then LA should
also be adjusted accordingly.
This stems from the fact that the source diameter/length needs to be
known in order to determine a compression factor which is independent of
the extrusion width, but the FW only ever sees one value currently (the
extrusion length) which combines both.
This makes it impossible for the FW to adjust for one OR the other
scenario, depending on what you expect for M221 to mean.
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.
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.