Revert/cleanup mininum extruder height during M600

This change restores the minimum extruder height for filament purge
during M600 from the current 50mm back to 27mm from FW 3.9.

We do this by introducing a new option for unload_filament() to indicate
that the unload is part of an automatic swap, and in such cases avoid
raising more than absolutely necessary (this will _also_ come in handy
to avoid the extra purge in PR  during M600).

A new define MIN_Z_FOR_SWAP is introduced for this purpose.
MIN_Z_FOR_UNLOAD is still used for manual lcd unload and for M702 and
hasn't been changed.
This commit is contained in:
Yuri D'Elia 2021-04-21 19:07:58 +02:00
parent 10de97c042
commit 8d04316497
4 changed files with 11 additions and 9 deletions

View file

@ -551,9 +551,10 @@ enum CalibrationStatus
// Try to maintain a minimum distance from the bed even when Z is
// unknown when doing the following operations
#define MIN_Z_FOR_LOAD 50
#define MIN_Z_FOR_UNLOAD 50
#define MIN_Z_FOR_PREHEAT 10
#define MIN_Z_FOR_LOAD 50 // lcd filament loading or autoload
#define MIN_Z_FOR_UNLOAD 50 // lcd filament unloading
#define MIN_Z_FOR_SWAP 27 // filament change (including M600)
#define MIN_Z_FOR_PREHEAT 10 // lcd preheat
#include "Configuration_adv.h"
#include "thermistortables.h"