Set FILAMENTCHANGE_FINALRETRACT instead of hardcoded 0

This commit is contained in:
Guðni Már Gilbert 2023-05-08 19:33:42 +00:00
parent d781dae35b
commit e24c2200f1
2 changed files with 3 additions and 3 deletions

View File

@ -8391,13 +8391,13 @@ Sigma_Exit:
M702 [ U | Z ] M702 [ U | Z ]
#### Parameters #### Parameters
- `U` - Retract distance for removal (manual reload). Default value is 0. - `U` - Retract distance for removal (manual reload). Default value is FILAMENTCHANGE_FINALRETRACT.
- `Z` - Move the Z axis by this distance. Default value is 0 to maintain backwards compatibility with older gcodes. - `Z` - Move the Z axis by this distance. Default value is 0 to maintain backwards compatibility with older gcodes.
*/ */
case 702: case 702:
{ {
float z_target = 0; float z_target = 0;
float unloadLength = 0; float unloadLength = FILAMENTCHANGE_FINALRETRACT;
if (code_seen('U')) unloadLength = code_value(); if (code_seen('U')) unloadLength = code_value();
// For safety only allow positive values // For safety only allow positive values

View File

@ -3859,7 +3859,7 @@ void lcd_wizard(WizState state)
setTargetHotend(PLA_PREHEAT_HOTEND_TEMP); setTargetHotend(PLA_PREHEAT_HOTEND_TEMP);
lcd_display_message_fullscreen_P(_i("Now I will preheat nozzle for PLA.")); ////MSG_WIZARD_WILL_PREHEAT c=20 r=4 lcd_display_message_fullscreen_P(_i("Now I will preheat nozzle for PLA.")); ////MSG_WIZARD_WILL_PREHEAT c=20 r=4
wait_preheat(); wait_preheat();
unload_filament(0); // unload current filament unload_filament(FILAMENTCHANGE_FINALRETRACT); // unload current filament
lcd_wizard_load(); // load filament lcd_wizard_load(); // load filament
setTargetHotend(0); //we are finished, cooldown nozzle setTargetHotend(0); //we are finished, cooldown nozzle
state = S::Restore; state = S::Restore;