Add unload position configurable in Configuration.h

pull/409/head
Luc 2021-01-12 10:44:59 +01:00
rodzic 445fa50f87
commit 1fcc1d0412
2 zmienionych plików z 214 dodań i 183 usunięć

Wyświetl plik

@ -120,6 +120,7 @@
#define MOTOR_DRIVER_1(var) StepperDriver<TURNTABLE_STEP_PIN,TURNTABLE_DIR_PIN,TURNTABLE_ENABLE_PIN,TURNTABLE_INVERT_DIR,TURNTABLE_INVERT_ENABLE> var(TURNTABLE_STEP_PER_MM,TURNTABLE_DEFAULT_SPEED)
#endif
/* Some words on units:
From 0.80 onwards the units used are unified for easier configuration, watch out when transferring from older configs!
@ -1120,6 +1121,46 @@ on this endstop.
#define Z_MIN_POS 0
#endif
//Unload Position
#if DAVINCI==0
#define UNLOAD_POS_E0_X 0
#define UNLOAD_POS_E0_Y 0
#define UNLOAD_POS_E1_X 0
#define UNLOAD_POS_E1_Y 0
#endif
#if DAVINCI==1 //cleaner of Davinci 1.0 is not in same position of 2.0 neither AiO
#if MODEL == 0
#define UNLOAD_POS_E0_X X_MIN_POS
#define UNLOAD_POS_E0_Y Y_MIN_POS
#define UNLOAD_POS_E1_X X_MIN_POS
#define UNLOAD_POS_E1_Y Y_MIN_POS
#else
#define UNLOAD_POS_E0_X X_MIN_POS
#define UNLOAD_POS_E0_Y Y_MIN_POS
#define UNLOAD_POS_E1_X X_MIN_POS
#define UNLOAD_POS_E1_Y Y_MIN_POS
#endif
#endif
#if DAVINCI==2 || DAVINCI==3
#if MODEL == 0
#define UNLOAD_POS_E0_X 199
#define UNLOAD_POS_E0_Y Y_MIN_POS
#define UNLOAD_POS_E1_X X_MIN_POS
#define UNLOAD_POS_E1_Y Y_MIN_POS
#else
#define UNLOAD_POS_E0_X 195
#define UNLOAD_POS_E0_Y Y_MIN_POS+30
#define UNLOAD_POS_E1_X X_MIN_POS
#define UNLOAD_POS_E1_Y Y_MIN_POS+30
#endif
#endif
#if DAVINCI==4
#define UNLOAD_POS_E0_X 0
#define UNLOAD_POS_E0_Y 0
#endif
// ##########################################################################################
// ## Movement settings ##
// ##########################################################################################

Wyświetl plik

@ -4878,40 +4878,30 @@ case UI_ACTION_LOAD_FAILSAFE:
{
load_dir=1;
extruderid=0;
#if NUM_EXTRUDER == 1
xpos=Printer::xMin;
ypos=Printer::yMin;
#else
xpos=Printer::xMin+Printer::xLength;
ypos=Printer::yMin;
#endif
xpos=UNLOAD_POS_E0_X;
ypos=UNLOAD_POS_E0_Y;
}
else if (action== UI_ACTION_UNLOAD_EXTRUDER_0)
{
load_dir=-1;
extruderid=0;
#if NUM_EXTRUDER == 1
xpos=Printer::xMin;
ypos=Printer::yMin;
#else
xpos=Printer::xMin+Printer::xLength;
ypos=Printer::yMin;
#endif
xpos=UNLOAD_POS_E0_X;
ypos=UNLOAD_POS_E0_Y;
}
#if NUM_EXTRUDER > 1
else if (action== UI_ACTION_LOAD_EXTRUDER_1)
{
load_dir=1;
extruderid=1;
xpos=Printer::xMin;
ypos=Printer::yMin;
xpos=UNLOAD_POS_E1_X;
ypos=UNLOAD_POS_E1_Y;
}
else if (action== UI_ACTION_UNLOAD_EXTRUDER_1)
{
load_dir=-1;
extruderid=1;
xpos=Printer::xMin;
ypos=Printer::yMin;
xpos=UNLOAD_POS_E1_X;
ypos=UNLOAD_POS_E1_Y;
}
#endif
#if NUM_EXTRUDER > 1