From 32da5bc039984bdaa770b8458b8206546aed6237 Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Mon, 12 Nov 2018 19:55:53 +0100 Subject: [PATCH] progress bar time counted from feedrate and E - distance --- Firmware/Marlin_main.cpp | 4 ++-- Firmware/ultralcd.cpp | 8 +++++--- Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h | 7 ++++--- Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h | 7 ++++--- Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h | 7 ++++--- Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h | 7 ++++--- Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h | 7 ++++--- 7 files changed, 27 insertions(+), 20 deletions(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 51de11f6..881af9d5 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -8966,7 +8966,7 @@ static void print_time_remaining_init() void load_filament_final_feed() { current_position[E_AXIS]+= FILAMENTCHANGE_FINALFEED; - plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 200/60, active_extruder); + plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], FILAMENTCHANGE_EFEED_FINAL, active_extruder); } void M600_check_state() @@ -9108,7 +9108,7 @@ void M600_load_filament_movements() plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 50, active_extruder); #else current_position[E_AXIS]+= FILAMENTCHANGE_FIRSTFEED ; - plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], FILAMENTCHANGE_EFEED, active_extruder); + plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], FILAMENTCHANGE_EFEED_FIRST, active_extruder); #endif load_filament_final_feed(); lcd_loading_filament(); diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 2d8ba024..5ef5afb7 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -2254,7 +2254,7 @@ void lcd_change_success() { } -static void lcd_loading_progress_bar(uint16_t loading_time_ms) { +static void lcd_loading_progress_bar(uint16_t loading_time_ms) { for (int i = 0; i < 20; i++) { lcd_set_cursor(i, 3); @@ -2277,7 +2277,7 @@ void lcd_loading_color() { lcd_puts_P(_i("Loading color"));////MSG_LOADING_COLOR c=0 r=0 lcd_set_cursor(0, 2); lcd_puts_P(_T(MSG_PLEASE_WAIT)); - lcd_loading_progress_bar(7500); //slow sequence: 7.5 seconds + lcd_loading_progress_bar((FILAMENTCHANGE_FINALFEED * 1000ul) / FILAMENTCHANGE_EFEED_FINAL); //show progress bar during filament loading slow sequence } @@ -2306,7 +2306,9 @@ void lcd_loading_filament() { } #else //SNMM - lcd_loading_progress_bar(11000); //fast + slow sequence: 7.5 seconds + uint16_t slow_seq_time = (FILAMENTCHANGE_FINALFEED * 1000ul) / FILAMENTCHANGE_EFEED_FINAL; + uint16_t fast_seq_time = (FILAMENTCHANGE_FIRSTFEED * 1000ul) / FILAMENTCHANGE_EFEED_FIRST; + lcd_loading_progress_bar(slow_seq_time + fast_seq_time); //show progress bar for total time of filament loading fast + slow sequence #endif //SNMM } diff --git a/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h index 91fc3076..f237e79a 100644 --- a/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h @@ -165,12 +165,13 @@ CHANGE FILAMENT SETTINGS #define FILAMENTCHANGE_FIRSTRETRACT -2 #define FILAMENTCHANGE_FINALRETRACT -80 -#define FILAMENTCHANGE_FIRSTFEED 70 -#define FILAMENTCHANGE_FINALFEED 50 +#define FILAMENTCHANGE_FIRSTFEED 70 //E distance in mm for fast filament loading sequence used used in filament change (M600) +#define FILAMENTCHANGE_FINALFEED 50 //E distance in mm for slow filament loading sequence used used in filament change (M600) and filament load (M701) #define FILAMENTCHANGE_RECFEED 5 #define FILAMENTCHANGE_XYFEED 50 -#define FILAMENTCHANGE_EFEED 20 +#define FILAMENTCHANGE_EFEED_FIRST 20 // feedrate in mm/s for fast filament loading sequence used in filament change (M600) +#define FILAMENTCHANGE_EFEED_FINAL 3.3f // feedrate in mm/s for slow filament loading sequence used in filament change (M600) and filament load (M701) #define FILAMENTCHANGE_RFEED 400 #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 diff --git a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h index d6abc032..e09178bb 100644 --- a/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h @@ -165,12 +165,13 @@ CHANGE FILAMENT SETTINGS #define FILAMENTCHANGE_FIRSTRETRACT -2 #define FILAMENTCHANGE_FINALRETRACT -80 -#define FILAMENTCHANGE_FIRSTFEED 70 -#define FILAMENTCHANGE_FINALFEED 50 +#define FILAMENTCHANGE_FIRSTFEED 70 //E distance in mm for fast filament loading sequence used used in filament change (M600) +#define FILAMENTCHANGE_FINALFEED 50 //E distance in mm for slow filament loading sequence used used in filament change (M600) and filament load (M701) #define FILAMENTCHANGE_RECFEED 5 #define FILAMENTCHANGE_XYFEED 50 -#define FILAMENTCHANGE_EFEED 20 +#define FILAMENTCHANGE_EFEED_FIRST 20 // feedrate in mm/s for fast filament loading sequence used in filament change (M600) +#define FILAMENTCHANGE_EFEED_FINAL 3.3f // feedrate in mm/s for slow filament loading sequence used in filament change (M600) and filament load (M701) #define FILAMENTCHANGE_RFEED 400 #define FILAMENTCHANGE_EXFEED 2 #define FILAMENTCHANGE_ZFEED 15 diff --git a/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h index 9450cb85..f3a5285d 100644 --- a/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK25-RAMBo10a-E3Dv6full.h @@ -220,12 +220,13 @@ #define FILAMENTCHANGE_FIRSTRETRACT -2 #define FILAMENTCHANGE_FINALRETRACT -80 -#define FILAMENTCHANGE_FIRSTFEED 70 -#define FILAMENTCHANGE_FINALFEED 25 +#define FILAMENTCHANGE_FIRSTFEED 70 //E distance in mm for fast filament loading sequence used used in filament change (M600) +#define FILAMENTCHANGE_FINALFEED 25 //E distance in mm for slow filament loading sequence used used in filament change (M600) and filament load (M701) #define FILAMENTCHANGE_RECFEED 5 #define FILAMENTCHANGE_XYFEED 50 -#define FILAMENTCHANGE_EFEED 20 +#define FILAMENTCHANGE_EFEED_FIRST 20 // feedrate in mm/s for fast filament loading sequence used in filament change (M600) +#define FILAMENTCHANGE_EFEED_FINAL 3.3f // feedrate in mm/s for slow filament loading sequence used in filament change (M600) and filament load (M701) //#define FILAMENTCHANGE_RFEED 400 #define FILAMENTCHANGE_RFEED 7000 / 60 #define FILAMENTCHANGE_EXFEED 2 diff --git a/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h b/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h index 8ff280c6..2aff81e0 100644 --- a/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK25-RAMBo13a-E3Dv6full.h @@ -221,12 +221,13 @@ #define FILAMENTCHANGE_FIRSTRETRACT -2 #define FILAMENTCHANGE_FINALRETRACT -80 -#define FILAMENTCHANGE_FIRSTFEED 70 -#define FILAMENTCHANGE_FINALFEED 25 +#define FILAMENTCHANGE_FIRSTFEED 70 //E distance in mm for fast filament loading sequence used used in filament change (M600) +#define FILAMENTCHANGE_FINALFEED 25 //E distance in mm for slow filament loading sequence used used in filament change (M600) and filament load (M701) #define FILAMENTCHANGE_RECFEED 5 #define FILAMENTCHANGE_XYFEED 50 -#define FILAMENTCHANGE_EFEED 20 +#define FILAMENTCHANGE_EFEED_FIRST 20 // feedrate in mm/s for fast filament loading sequence used in filament change (M600) +#define FILAMENTCHANGE_EFEED_FINAL 3.3f // feedrate in mm/s for slow filament loading sequence used in filament change (M600) and filament load (M701) //#define FILAMENTCHANGE_RFEED 400 #define FILAMENTCHANGE_RFEED 7000 / 60 #define FILAMENTCHANGE_EXFEED 2 diff --git a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h index 346f447a..4655107c 100644 --- a/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h +++ b/Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h @@ -341,12 +341,13 @@ #define FILAMENTCHANGE_FIRSTRETRACT -2 #define FILAMENTCHANGE_FINALRETRACT -80 -#define FILAMENTCHANGE_FIRSTFEED 70 -#define FILAMENTCHANGE_FINALFEED 25 +#define FILAMENTCHANGE_FIRSTFEED 70 //E distance in mm for fast filament loading sequence used used in filament change (M600) +#define FILAMENTCHANGE_FINALFEED 25 //E distance in mm for slow filament loading sequence used used in filament change (M600) and filament load (M701) #define FILAMENTCHANGE_RECFEED 5 #define FILAMENTCHANGE_XYFEED 50 -#define FILAMENTCHANGE_EFEED 20 +#define FILAMENTCHANGE_EFEED_FIRST 20 // feedrate in mm/s for fast filament loading sequence used in filament change (M600) +#define FILAMENTCHANGE_EFEED_FINAL 3.3f // feedrate in mm/s for slow filament loading sequence used in filament change (M600) and filament load (M701) //#define FILAMENTCHANGE_RFEED 400 #define FILAMENTCHANGE_RFEED 7000 / 60 #define FILAMENTCHANGE_EXFEED 2