Skip to content

Commit 197e519

Browse files
committed
new G27
1 parent 2720501 commit 197e519

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

Marlin/Configuration_adv.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -2848,7 +2848,7 @@
28482848
* [ Power-On -> T0 { T0 Activated } -> T1 { Activate & Prime T1 } -> T0 { Retract T1, Activate & Prime T0 } ]
28492849
* Enable with M217 V1 before printing to avoid unwanted priming on host connect.
28502850
*/
2851-
#define TOOLCHANGE_FS_PRIME_FIRST_USED
2851+
//#define TOOLCHANGE_FS_PRIME_FIRST_USED
28522852
/*
28532853
* Tool Change Migration
28542854
* This feature provides G-code and LCD options to switch tools mid-print.
@@ -4036,7 +4036,7 @@
40364036

40374037
#define MAIN_MENU_ITEM_1_DESC "Homing"
40384038
#define MAIN_MENU_ITEM_1_GCODE "G28"
4039-
#define MAIN_MENU_ITEM_1_CONFIRM // Show a confirmation dialog before this action
4039+
//#define MAIN_MENU_ITEM_1_CONFIRM // Show a confirmation dialog before this action
40404040

40414041
#define MAIN_MENU_ITEM_2_DESC "PLA/PVA"
40424042
#define MAIN_MENU_ITEM_2_GCODE "M140 S85\nM104 T0 S210\nM104 T1 S190"
@@ -4066,11 +4066,11 @@
40664066
#define MAIN_MENU_ITEM_8_GCODE "Z-hop 2"
40674067
//#define MAIN_MENU_ITEM_8_CONFIRM
40684068

4069-
#define MAIN_MENU_ITEM_9_DESC "T0 +G60"
4069+
//#define MAIN_MENU_ITEM_9_DESC "T0 +G60"
40704070
#define MAIN_MENU_ITEM_9_GCODE "G60\nT0\nG61F14400"
40714071
//#define MAIN_MENU_ITEM_9_CONFIRM
40724072

4073-
#define MAIN_MENU_ITEM_10_DESC "T1 +G60"
4073+
//#define MAIN_MENU_ITEM_10_DESC "T1 +G60"
40744074
#define MAIN_MENU_ITEM_10_GCODE "G60\nT1\nG61F14400"
40754075
//#define MAIN_MENU_ITEM_5_CONFIRM
40764076

@@ -4086,19 +4086,19 @@
40864086
#define MAIN_MENU_ITEM_13_GCODE "G27"
40874087
//#define MAIN_MENU_ITEM_13_CONFIRM
40884088

4089-
#define MAIN_MENU_ITEM_14_DESC "Nettoyage lignes x2"
4089+
#define MAIN_MENU_ITEM_14_DESC "Full Clean lines"
40904090
#define MAIN_MENU_ITEM_14_GCODE "G60\nG27\nM280 H0\nG12 P0\nM280 C\nG61F14400"
40914091
//#define MAIN_MENU_ITEM_18_CONFIRM
40924092

4093-
#define MAIN_MENU_ITEM_15_DESC "Nettoyage triangles x2"
4093+
#define MAIN_MENU_ITEM_15_DESC "Full Clean Triangles"
40944094
#define MAIN_MENU_ITEM_15_GCODE "G60\nG27\nM280 H0\nG12\nM280 C\nG61F14400"
40954095
//#define MAIN_MENU_ITEM_18_CONFIRM
40964096

40974097
#define MAIN_MENU_ITEM_17_DESC "Calibration"
40984098
#define MAIN_MENU_ITEM_17_GCODE "G425"
40994099
//#define MAIN_MENU_ITEM_17_CONFIRM
41004100

4101-
#define MAIN_MENU_ITEM_19_DESC "Nettoyage en cours"
4101+
#define MAIN_MENU_ITEM_19_DESC "Clean one realtime"
41024102
#define MAIN_MENU_ITEM_19_GCODE "G60\nG10\nG91\nG0Z5\nG90\nG12P0\nG91\nG0Z-5\nG90\nG11\nG61F14400"
41034103
//#define MAIN_MENU_ITEM_19_CONFIRM
41044104

@@ -4122,7 +4122,7 @@
41224122
#define MAIN_MENU_ITEM_24_GCODE "M306 E1 P70.00 C18.67 R0.4205 A0.0056 F0.0170 H0.0056"
41234123
//#define MAIN_MENU_ITEM_24_CONFIRM
41244124

4125-
#define MAIN_MENU_ITEM_25_DESC "ToolChange neutre"
4125+
//#define MAIN_MENU_ITEM_25_DESC "ToolChange neutre"
41264126
#define MAIN_MENU_ITEM_25_GCODE "M217 W0 E0 D0 G0 S0 B0 Z0"
41274127
//#define MAIN_MENU_ITEM_25_CONFIRM
41284128

Marlin/src/libs/nozzle.cpp

+11-1
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,18 @@ Nozzle nozzle;
293293
#define NOZZLE_PARK_MOVE 0
294294
#endif
295295
constexpr feedRate_t fr_xy = NOZZLE_PARK_XY_FEEDRATE;
296+
297+
//Random park position (Between range possibility)
298+
xyz_pos_t rand_park = park,
299+
rand_start[HOTENDS] = NOZZLE_CLEAN_START_POINT,
300+
rand_end[HOTENDS] = NOZZLE_CLEAN_END_POINT;
301+
if (active_extruder == 0) rand_end[0].x = rand_end[1].x - hotend_offset[1].x;
302+
if (active_extruder == 1) rand_start[1].x = rand_start[0].x + hotend_offset[1].x;
303+
rand_park.x = random(rand_start[active_extruder].x , rand_end[active_extruder].x-5);
304+
NOLESS(rand_park.x, active_extruder?X_MIN_POS+hotend_offset[active_extruder]:X_MIN_POS);
305+
296306
switch (NOZZLE_PARK_MOVE) {
297-
case 0: do_blocking_move_to_xy(park, fr_xy); break;
307+
case 0: do_blocking_move_to_xy(rand_park, fr_xy); break;
298308
case 1: do_blocking_move_to_x(park.x, fr_xy); break;
299309
case 2: do_blocking_move_to_y(park.y, fr_xy); break;
300310
case 3: do_blocking_move_to_x(park.x, fr_xy);

0 commit comments

Comments
 (0)