From 7e593e6922a8207d4d43df22c74a8f8650eb5b1f Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Mon, 24 Sep 2018 17:03:10 +0200 Subject: [PATCH] Use cs.autoretract_enabled from ConfigurationStore. --- Firmware/ConfigurationStore.cpp | 2 +- Firmware/Marlin.h | 1 - Firmware/Marlin_main.cpp | 7 +++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Firmware/ConfigurationStore.cpp b/Firmware/ConfigurationStore.cpp index 2b5095ef..50ac9f6e 100644 --- a/Firmware/ConfigurationStore.cpp +++ b/Firmware/ConfigurationStore.cpp @@ -138,7 +138,7 @@ void Config_PrintSettings(uint8_t level) ), echomagic, echomagic, retract_length, retract_feedrate*60, retract_zlift, echomagic, echomagic, retract_recover_length, retract_recover_feedrate*60, - echomagic, echomagic, (autoretract_enabled ? 1 : 0) + echomagic, echomagic, (cs.autoretract_enabled ? 1 : 0) ); #if EXTRUDERS > 1 printf_P(PSTR("%SMulti-extruder settings:\n%S Swap retract length (mm): %.2f\n%S Swap rec. addl. length (mm): %.2f\n"), diff --git a/Firmware/Marlin.h b/Firmware/Marlin.h index 9791b420..29b6946e 100644 --- a/Firmware/Marlin.h +++ b/Firmware/Marlin.h @@ -287,7 +287,6 @@ extern unsigned char fanSpeedSoftPwm; #endif #ifdef FWRETRACT -extern bool autoretract_enabled; extern bool retracted[EXTRUDERS]; extern float retract_length, retract_length_swap, retract_feedrate, retract_zlift; extern float retract_recover_length, retract_recover_length_swap, retract_recover_feedrate; diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index c53606ce..6405d69e 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -411,7 +411,6 @@ uint8_t active_extruder = 0; int fanSpeed=0; #ifdef FWRETRACT - bool autoretract_enabled=false; bool retracted[EXTRUDERS]={false #if EXTRUDERS > 1 , false @@ -3721,7 +3720,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE)) total_filament_used = total_filament_used + ((destination[E_AXIS] - current_position[E_AXIS]) * 100); } #ifdef FWRETRACT - if(autoretract_enabled) + if(cs.autoretract_enabled) if( !(code_seen('X') || code_seen('Y') || code_seen('Z')) && code_seen('E')) { float echange=destination[E_AXIS]-current_position[E_AXIS]; @@ -6010,7 +6009,7 @@ Sigma_Exit: { case 0: { - autoretract_enabled=false; + cs.autoretract_enabled=false; retracted[0]=false; #if EXTRUDERS > 1 retracted[1]=false; @@ -6021,7 +6020,7 @@ Sigma_Exit: }break; case 1: { - autoretract_enabled=true; + cs.autoretract_enabled=true; retracted[0]=false; #if EXTRUDERS > 1 retracted[1]=false;