Sfoglia il codice sorgente

Fix lcd_synchronize with message

Scott Lahteine 8 anni fa
parent
commit
78d8c598e1
1 ha cambiato i file con 11 aggiunte e 4 eliminazioni
  1. 11
    4
      Marlin/ultralcd.cpp

+ 11
- 4
Marlin/ultralcd.cpp Vedi File

481
   /**
481
   /**
482
    * Show "Moving..." till moves are done, then revert to previous display.
482
    * Show "Moving..." till moves are done, then revert to previous display.
483
    */
483
    */
484
-  inline void lcd_synchronize(const char * const msg=NULL) {
484
+  static const char moving[] PROGMEM = MSG_MOVING;
485
+  static const char *sync_message = moving;
486
+
487
+  void _lcd_synchronize() {
485
     static bool no_reentry = false;
488
     static bool no_reentry = false;
486
-    const static char moving[] PROGMEM = MSG_MOVING;
487
-    lcd_implementation_drawmenu_static(LCD_HEIGHT >= 4 ? 1 : 0, msg ? msg : moving);
489
+    if (lcdDrawUpdate) lcd_implementation_drawmenu_static(LCD_HEIGHT >= 4 ? 1 : 0, sync_message);
488
     if (no_reentry) return;
490
     if (no_reentry) return;
489
 
491
 
490
     // Make this the current handler till all moves are done
492
     // Make this the current handler till all moves are done
491
     no_reentry = true;
493
     no_reentry = true;
492
     screenFunc_t old_screen = currentScreen;
494
     screenFunc_t old_screen = currentScreen;
493
-    lcd_goto_screen(lcd_synchronize);
495
+    lcd_goto_screen(_lcd_synchronize);
494
     stepper.synchronize();
496
     stepper.synchronize();
495
     no_reentry = false;
497
     no_reentry = false;
496
     lcd_goto_screen(old_screen);
498
     lcd_goto_screen(old_screen);
497
   }
499
   }
498
 
500
 
501
+  void lcd_synchronize(const char * const msg=NULL) {
502
+    sync_message = msg ? msg : moving;
503
+    _lcd_synchronize();
504
+  }
505
+
499
   void lcd_return_to_status() { lcd_goto_screen(lcd_status_screen); }
506
   void lcd_return_to_status() { lcd_goto_screen(lcd_status_screen); }
500
 
507
 
501
   void lcd_save_previous_screen() {
508
   void lcd_save_previous_screen() {

Loading…
Annulla
Salva