timeout to status, better print time counting when using pause print

This commit is contained in:
PavelSindler 2017-04-21 16:29:04 +02:00
parent 4eaefd923a
commit 7ec45271c2
4 changed files with 10 additions and 8 deletions

View file

@ -5,7 +5,7 @@
#include "Configuration_prusa.h"
// Firmware version
#define FW_version "3.0.11-alpha"
#define FW_version "3.0.10-10"
#define FW_PRUSA3D_MAGIC "PRUSA3DFW"
#define FW_PRUSA3D_MAGIC_LEN 10

View file

@ -317,6 +317,7 @@ extern float HotendTempBckp;
extern int fanSpeedBckp;
extern float pause_lastpos[4];
extern unsigned long pause_time;
extern unsigned long start_pause_print;
extern bool mesh_bed_leveling_flag;

View file

@ -263,6 +263,7 @@ float HotendTempBckp = 0;
int fanSpeedBckp = 0;
float pause_lastpos[4];
unsigned long pause_time = 0;
unsigned long start_pause_print = millis();
bool mesh_bed_leveling_flag = false;
@ -6320,7 +6321,7 @@ void temp_compensation_start() {
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 3000 / 60, active_extruder);
st_synchronize();
while (fabs(degBed() - target_temperature_bed) > 3) delay_keep_alive(1000);
while (fabs(degBed() - target_temperature_bed) > 1) delay_keep_alive(1000);
for(int i = 0; i < PINDA_HEAT_T; i++) delay_keep_alive(1000);
@ -6428,8 +6429,8 @@ void long_pause() //long pause print
saved_feedmultiply = feedmultiply;
HotendTempBckp = degTargetHotend(active_extruder);
fanSpeedBckp = fanSpeed;
pause_time += (millis() - starttime);
start_pause_print = millis();
//save position
pause_lastpos[X_AXIS] = current_position[X_AXIS];

View file

@ -540,11 +540,12 @@ void lcd_commands()
lcdDrawUpdate = 3;
lcd_commands_step = 4;
}
if (lcd_commands_step == 1 && !blocks_queued()) { //recover feedmultiply, current
if (lcd_commands_step == 1 && !blocks_queued()) { //recover feedmultiply
sprintf_P(cmd1, PSTR("M220 S%d"), saved_feedmultiply);
enquecommand(cmd1);
isPrintPaused = false;
pause_time += (millis() - start_pause_print); //accumulate time when print is paused for correct statistics calculation
card.startFileprint();
lcd_commands_step = 0;
lcd_commands_type = 0;
@ -580,7 +581,7 @@ void lcd_commands()
strcat(cmd1, " Y");
strcat(cmd1, ftostr32(pause_lastpos[Y_AXIS]));
enquecommand(cmd1);
lcd_setstatuspgm(MSG_RESUMING_PRINT);
lcd_commands_step = 3;
}
@ -2436,7 +2437,6 @@ void lcd_pinda_calibration_menu()
START_MENU();
MENU_ITEM(back, MSG_MENU_CALIBRATION, lcd_calibration_menu);
MENU_ITEM(submenu, MSG_CALIBRATE_PINDA, lcd_calibrate_pinda);
//MENU_ITEM(back, MSG_SETTINGS, lcd_settings_menu);
if (temp_cal_active == false) {
MENU_ITEM(function, MSG_TEMP_CALIBRATION_OFF, lcd_temp_calibration_set);
}
@ -4651,7 +4651,7 @@ void lcd_update(uint8_t lcdDrawUpdateOverride)
lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
}
/*if (LCD_CLICKED)*/ lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
if (LCD_CLICKED) lcd_timeoutToStatus = millis() + LCD_TIMEOUT_TO_STATUS;
#endif//ULTIPANEL
#ifdef DOGLCD // Changes due to different driver architecture of the DOGM display