Commit 744b1137 authored by MagoKimbra's avatar MagoKimbra

Fix Serial Protocol

parent 93bf0686
...@@ -3385,7 +3385,7 @@ inline void gcode_G28() { ...@@ -3385,7 +3385,7 @@ inline void gcode_G28() {
#if ENABLED(ULTIPANEL) #if ENABLED(ULTIPANEL)
ECHO_LM(DB, "--LEVEL PLATE SCRIPT--"); ECHO_LM(DB, "--LEVEL PLATE SCRIPT--");
while(!lcd_clicked()) { while(!lcd_clicked()) {
idle(true); idle();
} }
saved_feedrate = feedrate; saved_feedrate = feedrate;
saved_feedrate_multiplier = feedrate_multiplier; saved_feedrate_multiplier = feedrate_multiplier;
...@@ -3425,7 +3425,7 @@ inline void gcode_G28() { ...@@ -3425,7 +3425,7 @@ inline void gcode_G28() {
do_blocking_move_to(LEFT_PROBE_BED_POSITION, FRONT_PROBE_BED_POSITION, current_position[Z_AXIS]); do_blocking_move_to(LEFT_PROBE_BED_POSITION, FRONT_PROBE_BED_POSITION, current_position[Z_AXIS]);
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_MIN_POS); do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_MIN_POS);
while(!lcd_clicked()) { while(!lcd_clicked()) {
idle(true); idle();
} }
// PROBE SECOND POINT // PROBE SECOND POINT
...@@ -3434,7 +3434,7 @@ inline void gcode_G28() { ...@@ -3434,7 +3434,7 @@ inline void gcode_G28() {
do_blocking_move_to(RIGHT_PROBE_BED_POSITION, FRONT_PROBE_BED_POSITION, current_position[Z_AXIS]); do_blocking_move_to(RIGHT_PROBE_BED_POSITION, FRONT_PROBE_BED_POSITION, current_position[Z_AXIS]);
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_MIN_POS); do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_MIN_POS);
while(!lcd_clicked()) { while(!lcd_clicked()) {
idle(true); idle();
} }
// PROBE THIRD POINT // PROBE THIRD POINT
...@@ -3443,7 +3443,7 @@ inline void gcode_G28() { ...@@ -3443,7 +3443,7 @@ inline void gcode_G28() {
do_blocking_move_to(RIGHT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION, current_position[Z_AXIS]); do_blocking_move_to(RIGHT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION, current_position[Z_AXIS]);
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_MIN_POS); do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_MIN_POS);
while(!lcd_clicked()) { while(!lcd_clicked()) {
idle(true); idle();
} }
// PROBE FOURTH POINT // PROBE FOURTH POINT
...@@ -3452,7 +3452,7 @@ inline void gcode_G28() { ...@@ -3452,7 +3452,7 @@ inline void gcode_G28() {
do_blocking_move_to(LEFT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION, current_position[Z_AXIS]); do_blocking_move_to(LEFT_PROBE_BED_POSITION, BACK_PROBE_BED_POSITION, current_position[Z_AXIS]);
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_MIN_POS); do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_MIN_POS);
while(!lcd_clicked()) { while(!lcd_clicked()) {
idle(true); idle();
} }
// PROBE CENTER // PROBE CENTER
...@@ -3461,7 +3461,7 @@ inline void gcode_G28() { ...@@ -3461,7 +3461,7 @@ inline void gcode_G28() {
do_blocking_move_to(((X_MAX_POS) - (X_MIN_POS)) / 2, ((Y_MAX_POS) - (Y_MIN_POS)) / 2, current_position[Z_AXIS]); do_blocking_move_to(((X_MAX_POS) - (X_MIN_POS)) / 2, ((Y_MAX_POS) - (Y_MIN_POS)) / 2, current_position[Z_AXIS]);
do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_MIN_POS); do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], Z_MIN_POS);
while(!lcd_clicked()) { while(!lcd_clicked()) {
idle(true); idle();
} }
// FINISH MANUAL BED LEVEL // FINISH MANUAL BED LEVEL
...@@ -6978,7 +6978,7 @@ inline void gcode_M503() { ...@@ -6978,7 +6978,7 @@ inline void gcode_M503() {
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
LCD_ALERTMESSAGEPGM(MSG_FILAMENTCHANGE); LCD_ALERTMESSAGEPGM(MSG_FILAMENTCHANGE);
while (!lcd_clicked()) { while (!lcd_clicked()) {
idle(true); idle();
if ((millis() - last_set > 60000) && cnt <= FILAMENTCHANGE_PRINTEROFF) beep = true; if ((millis() - last_set > 60000) && cnt <= FILAMENTCHANGE_PRINTEROFF) beep = true;
if (cnt >= FILAMENTCHANGE_PRINTEROFF && !sleep) { if (cnt >= FILAMENTCHANGE_PRINTEROFF && !sleep) {
disable_all_heaters(); disable_all_heaters();
......
This diff is collapsed.
...@@ -1716,7 +1716,7 @@ static void menu_action_function(menuFunc_t func) { (*func)(); } ...@@ -1716,7 +1716,7 @@ static void menu_action_function(menuFunc_t func) { (*func)(); }
char* c; char* c;
sprintf_P(cmd, PSTR("M23 %s"), longFilename); sprintf_P(cmd, PSTR("M23 %s"), longFilename);
for (c = &cmd[4]; *c; c++) *c = tolower(*c); for (c = &cmd[4]; *c; c++) *c = tolower(*c);
enqueuecommand(cmd); enqueue_and_echo_command(cmd);
enqueue_and_echo_commands_P(PSTR("M24")); enqueue_and_echo_commands_P(PSTR("M24"));
lcd_return_to_status(); lcd_return_to_status();
} }
......
...@@ -726,11 +726,11 @@ static void lcd_implementation_status_screen() { ...@@ -726,11 +726,11 @@ static void lcd_implementation_status_screen() {
#endif // LCD_WIDTH > 19 && SDSUPPORT #endif // LCD_WIDTH > 19 && SDSUPPORT
lcd.setCursor(LCD_WIDTH - 6, 2); lcd.setCursor(LCD_WIDTH - 6, 2);
if(print_job_start_ms != 0) { uint16_t time = print_job_timer.duration() / 60;
if(time != 0) {
#if HAS(LCD_POWER_SENSOR) #if HAS(LCD_POWER_SENSOR)
if (millis() < print_millis + 1000) { if (millis() < print_millis + 1000) {
lcd.print(LCD_STR_CLOCK[0]); lcd.print(LCD_STR_CLOCK[0]);
uint16_t time = millis()/60000 - print_job_start_ms/60000;
lcd.print(itostr2(time/60)); lcd.print(itostr2(time/60));
lcd.print(':'); lcd.print(':');
lcd.print(itostr2(time%60)); lcd.print(itostr2(time%60));
...@@ -741,7 +741,6 @@ static void lcd_implementation_status_screen() { ...@@ -741,7 +741,6 @@ static void lcd_implementation_status_screen() {
} }
#else #else
lcd.print(LCD_STR_CLOCK[0]); lcd.print(LCD_STR_CLOCK[0]);
uint16_t time = millis()/60000 - print_job_start_ms/60000;
lcd.print(itostr2(time/60)); lcd.print(itostr2(time/60));
lcd.print(':'); lcd.print(':');
lcd.print(itostr2(time%60)); lcd.print(itostr2(time%60));
......
...@@ -276,7 +276,7 @@ ...@@ -276,7 +276,7 @@
char* c; char* c;
sprintf_P(cmd, PSTR("M23 %s"), filename); sprintf_P(cmd, PSTR("M23 %s"), filename);
for(c = &cmd[4]; *c; c++) *c = tolower(*c); for(c = &cmd[4]; *c; c++) *c = tolower(*c);
enqueuecommand(cmd); enqueue_and_echo_command(cmd);
enqueue_and_echo_commands_P(PSTR("M24")); enqueue_and_echo_commands_P(PSTR("M24"));
setpageInfo(); setpageInfo();
} }
...@@ -647,7 +647,7 @@ ...@@ -647,7 +647,7 @@
NPlay.setPic(17); NPlay.setPic(17);
// Estimate End Time // Estimate End Time
uint16_t time = (millis() - print_job_start_ms) / 60000; uint16_t time = print_job_timer.duration() / 60;
uint16_t end_time = (time * (100 - card.percentDone())) / card.percentDone(); uint16_t end_time = (time * (100 - card.percentDone())) / card.percentDone();
if (end_time > (60 * 23)) { if (end_time > (60 * 23)) {
lcd_setstatus("End --:--"); lcd_setstatus("End --:--");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment