Merge branch 'MK3' into time_remaining_fix
# Conflicts: # Firmware/Marlin_main.cpp
This commit is contained in:
commit
001680bbdc
5 changed files with 56 additions and 7 deletions
|
@ -1665,7 +1665,7 @@ void setup()
|
||||||
}
|
}
|
||||||
else if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION) {
|
else if (calibration_status() == CALIBRATION_STATUS_Z_CALIBRATION) {
|
||||||
// Show the message.
|
// Show the message.
|
||||||
lcd_show_fullscreen_message_and_wait_P(_T(MSG_FOLLOW_CALIBRATION_FLOW));
|
lcd_show_fullscreen_message_and_wait_P(_T(MSG_FOLLOW_Z_CALIBRATION_FLOW));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8857,8 +8857,12 @@ void print_mesh_bed_leveling_table()
|
||||||
|
|
||||||
uint16_t print_time_remaining() {
|
uint16_t print_time_remaining() {
|
||||||
uint16_t print_t = PRINT_TIME_REMAINING_INIT;
|
uint16_t print_t = PRINT_TIME_REMAINING_INIT;
|
||||||
|
#ifdef TMC2130
|
||||||
if (SilentModeMenu == SILENT_MODE_OFF) print_t = print_time_remaining_normal;
|
if (SilentModeMenu == SILENT_MODE_OFF) print_t = print_time_remaining_normal;
|
||||||
else print_t = print_time_remaining_silent;
|
else print_t = print_time_remaining_silent;
|
||||||
|
#else
|
||||||
|
print_t = print_time_remaining_normal;
|
||||||
|
#endif //TMC2130
|
||||||
if ((print_t != PRINT_TIME_REMAINING_INIT) && (feedmultiply != 0)) print_t = 100ul * print_t / feedmultiply;
|
if ((print_t != PRINT_TIME_REMAINING_INIT) && (feedmultiply != 0)) print_t = 100ul * print_t / feedmultiply;
|
||||||
return print_t;
|
return print_t;
|
||||||
}
|
}
|
||||||
|
@ -8867,12 +8871,18 @@ uint8_t calc_percent_done()
|
||||||
{
|
{
|
||||||
//in case that we have information from M73 gcode return percentage counted by slicer, else return percentage counted as byte_printed/filesize
|
//in case that we have information from M73 gcode return percentage counted by slicer, else return percentage counted as byte_printed/filesize
|
||||||
uint8_t percent_done = 0;
|
uint8_t percent_done = 0;
|
||||||
|
#ifdef TMC2130
|
||||||
if (SilentModeMenu == SILENT_MODE_OFF && print_percent_done_normal <= 100) {
|
if (SilentModeMenu == SILENT_MODE_OFF && print_percent_done_normal <= 100) {
|
||||||
percent_done = print_percent_done_normal;
|
percent_done = print_percent_done_normal;
|
||||||
}
|
}
|
||||||
else if (print_percent_done_silent <= 100) {
|
else if (print_percent_done_silent <= 100) {
|
||||||
percent_done = print_percent_done_silent;
|
percent_done = print_percent_done_silent;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
if (print_percent_done_normal <= 100) {
|
||||||
|
percent_done = print_percent_done_normal;
|
||||||
|
}
|
||||||
|
#endif //TMC2130
|
||||||
else {
|
else {
|
||||||
percent_done = card.percentDone();
|
percent_done = card.percentDone();
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@ const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE1[] PROGMEM_I1 = ISTR("Searching bed
|
||||||
const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE2[] PROGMEM_I1 = ISTR(" of 4"); ////c=14 r=0
|
const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE2[] PROGMEM_I1 = ISTR(" of 4"); ////c=14 r=0
|
||||||
const char MSG_FINISHING_MOVEMENTS[] PROGMEM_I1 = ISTR("Finishing movements"); ////c=20 r=1
|
const char MSG_FINISHING_MOVEMENTS[] PROGMEM_I1 = ISTR("Finishing movements"); ////c=20 r=1
|
||||||
const char MSG_FOLLOW_CALIBRATION_FLOW[] PROGMEM_I1 = ISTR("Printer has not been calibrated yet. Please follow the manual, chapter First steps, section Calibration flow."); ////c=20 r=8
|
const char MSG_FOLLOW_CALIBRATION_FLOW[] PROGMEM_I1 = ISTR("Printer has not been calibrated yet. Please follow the manual, chapter First steps, section Calibration flow."); ////c=20 r=8
|
||||||
|
const char MSG_FOLLOW_Z_CALIBRATION_FLOW[] PROGMEM_I1 = ISTR("There is still a need to make Z calibration. Please follow the manual, chapter First steps, section Calibration flow."); ////c=20 r=8
|
||||||
const char MSG_FSENS_AUTOLOAD_NA[] PROGMEM_I1 = ISTR("F. autoload [N/A]"); ////c=17 r=1
|
const char MSG_FSENS_AUTOLOAD_NA[] PROGMEM_I1 = ISTR("F. autoload [N/A]"); ////c=17 r=1
|
||||||
const char MSG_FSENSOR_OFF[] PROGMEM_I1 = ISTR("Fil. sensor [off]"); ////c=0 r=0
|
const char MSG_FSENSOR_OFF[] PROGMEM_I1 = ISTR("Fil. sensor [off]"); ////c=0 r=0
|
||||||
const char MSG_FSENSOR_ON[] PROGMEM_I1 = ISTR("Fil. sensor [on]"); ////c=0 r=0
|
const char MSG_FSENSOR_ON[] PROGMEM_I1 = ISTR("Fil. sensor [on]"); ////c=0 r=0
|
||||||
|
|
|
@ -40,6 +40,7 @@ extern const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE1[];
|
||||||
extern const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE2[];
|
extern const char MSG_FIND_BED_OFFSET_AND_SKEW_LINE2[];
|
||||||
extern const char MSG_FINISHING_MOVEMENTS[];
|
extern const char MSG_FINISHING_MOVEMENTS[];
|
||||||
extern const char MSG_FOLLOW_CALIBRATION_FLOW[];
|
extern const char MSG_FOLLOW_CALIBRATION_FLOW[];
|
||||||
|
extern const char MSG_FOLLOW_Z_CALIBRATION_FLOW[];
|
||||||
extern const char MSG_FSENS_AUTOLOAD_NA[];
|
extern const char MSG_FSENS_AUTOLOAD_NA[];
|
||||||
extern const char MSG_FSENSOR_OFF[];
|
extern const char MSG_FSENSOR_OFF[];
|
||||||
extern const char MSG_FSENSOR_ON[];
|
extern const char MSG_FSENSOR_ON[];
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
#include "cardreader.h"
|
#include "cardreader.h"
|
||||||
#include "ultralcd.h"
|
#include "ultralcd.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
#include <avr/pgmspace.h>
|
||||||
|
|
||||||
#define CHECK_FINDA ((IS_SD_PRINTING || is_usb_printing) && (mcode_in_progress != 600) && !saved_printing && e_active())
|
#define CHECK_FINDA ((IS_SD_PRINTING || is_usb_printing) && (mcode_in_progress != 600) && !saved_printing && e_active())
|
||||||
|
|
||||||
|
@ -642,6 +643,37 @@ void extr_adj(int extruder) //loading filament for SNMM
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct E_step
|
||||||
|
{
|
||||||
|
float extrude; //!< extrude distance in mm
|
||||||
|
float feed_rate; //!< feed rate in mm/s
|
||||||
|
};
|
||||||
|
static const E_step ramming_sequence[] PROGMEM =
|
||||||
|
{
|
||||||
|
{1.0, 1000.0/60},
|
||||||
|
{1.0, 1500.0/60},
|
||||||
|
{2.0, 2000.0/60},
|
||||||
|
{1.5, 3000.0/60},
|
||||||
|
{2.5, 4000.0/60},
|
||||||
|
{-15.0, 5000.0/60},
|
||||||
|
{-14.0, 1200.0/60},
|
||||||
|
{-6.0, 600.0/60},
|
||||||
|
{10.0, 700.0/60},
|
||||||
|
{-10.0, 400.0/60},
|
||||||
|
{-50.0, 2000.0/60},
|
||||||
|
};
|
||||||
|
|
||||||
|
//! @brief Unload sequence to optimize shape of the tip of the unloaded filament
|
||||||
|
static void filament_ramming()
|
||||||
|
{
|
||||||
|
for(uint8_t i = 0; i < (sizeof(ramming_sequence)/sizeof(E_step));++i)
|
||||||
|
{
|
||||||
|
current_position[E_AXIS] += pgm_read_float(&(ramming_sequence[i].extrude));
|
||||||
|
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS],
|
||||||
|
current_position[E_AXIS], pgm_read_float(&(ramming_sequence[i].feed_rate)), active_extruder);
|
||||||
|
st_synchronize();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void extr_unload()
|
void extr_unload()
|
||||||
{ //unload just current filament for multimaterial printers
|
{ //unload just current filament for multimaterial printers
|
||||||
|
@ -663,9 +695,7 @@ void extr_unload()
|
||||||
lcd_print(" ");
|
lcd_print(" ");
|
||||||
lcd_print(mmu_extruder + 1);
|
lcd_print(mmu_extruder + 1);
|
||||||
|
|
||||||
current_position[E_AXIS] -= 80;
|
filament_ramming();
|
||||||
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 2500 / 60, active_extruder);
|
|
||||||
st_synchronize();
|
|
||||||
|
|
||||||
mmu_command(MMU_CMD_U0);
|
mmu_command(MMU_CMD_U0);
|
||||||
// get response
|
// get response
|
||||||
|
|
|
@ -597,8 +597,15 @@ void lcdui_print_time(void)
|
||||||
int chars = 0;
|
int chars = 0;
|
||||||
if ((PRINTER_ACTIVE) && ((print_time_remaining_normal != PRINT_TIME_REMAINING_INIT) || (starttime != 0)))
|
if ((PRINTER_ACTIVE) && ((print_time_remaining_normal != PRINT_TIME_REMAINING_INIT) || (starttime != 0)))
|
||||||
{
|
{
|
||||||
char suff = (print_time_remaining_normal == PRINT_TIME_REMAINING_INIT)?' ':'R';
|
char suff = ' ';
|
||||||
chars = lcd_printf_P(_N("%c%02u:%02u%c"), LCD_STR_CLOCK[0], print_t / 60, print_t % 60, suff);
|
char suff_doubt = ' ';
|
||||||
|
if (print_time_remaining_normal != PRINT_TIME_REMAINING_INIT)
|
||||||
|
{
|
||||||
|
suff = 'R';
|
||||||
|
if (feedmultiply != 100)
|
||||||
|
suff_doubt = '?';
|
||||||
|
}
|
||||||
|
chars = lcd_printf_P(_N("%c%02u:%02u%c%c"), LCD_STR_CLOCK[0], print_t / 60, print_t % 60, suff, suff_doubt);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
chars = lcd_printf_P(_N("%c--:-- "), LCD_STR_CLOCK[0]);
|
chars = lcd_printf_P(_N("%c--:-- "), LCD_STR_CLOCK[0]);
|
||||||
|
|
Loading…
Reference in a new issue