Просмотр исходного кода

Draw on LCD after value has changed

Scott Lahteine 8 лет назад
Родитель
Сommit
0f1e8c195d
1 измененных файлов: 11 добавлений и 10 удалений
  1. 11
    10
      Marlin/ultralcd.cpp

+ 11
- 10
Marlin/ultralcd.cpp Просмотреть файл

@@ -236,23 +236,23 @@ uint16_t max_display_update_time = 0;
236 236
    *     menu_action_setting_edit_int3(PSTR(MSG_SPEED), &feedrate_percentage, 10, 999)
237 237
    *
238 238
    */
239
-  #define _MENU_ITEM_PART_1(TYPE, LABEL, ...) \
239
+  #define _MENU_ITEM_PART_1(TYPE, ...) \
240 240
     if (_menuLineNr == _thisItemNr) { \
241
-      if (lcdDrawUpdate) \
242
-        lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## __VA_ARGS__); \
243 241
       if (lcd_clicked && encoderLine == _thisItemNr) {
244 242
 
245
-  #define _MENU_ITEM_PART_2(TYPE, ...) \
243
+  #define _MENU_ITEM_PART_2(TYPE, LABEL, ...) \
246 244
         menu_action_ ## TYPE(__VA_ARGS__); \
247 245
         if (screen_changed) return; \
248 246
       } \
247
+      if (lcdDrawUpdate) \
248
+        lcd_implementation_drawmenu_ ## TYPE(encoderLine == _thisItemNr, _lcdLineNr, PSTR(LABEL), ## __VA_ARGS__); \
249 249
     } \
250 250
     ++_thisItemNr
251 251
 
252 252
   #define MENU_ITEM(TYPE, LABEL, ...) do { \
253 253
       _skipStatic = false; \
254
-      _MENU_ITEM_PART_1(TYPE, LABEL, ## __VA_ARGS__); \
255
-      _MENU_ITEM_PART_2(TYPE, ## __VA_ARGS__); \
254
+      _MENU_ITEM_PART_1(TYPE, ## __VA_ARGS__); \
255
+      _MENU_ITEM_PART_2(TYPE, LABEL, ## __VA_ARGS__); \
256 256
     } while(0)
257 257
 
258 258
   #define MENU_BACK(LABEL) MENU_ITEM(back, LABEL, 0)
@@ -281,10 +281,10 @@ uint16_t max_display_update_time = 0;
281 281
      * MENU_MULTIPLIER_ITEM generates drawing and handling code for a multiplier menu item
282 282
      */
283 283
     #define MENU_MULTIPLIER_ITEM(type, label, ...) do { \
284
-        _MENU_ITEM_PART_1(type, label, ## __VA_ARGS__); \
284
+        _MENU_ITEM_PART_1(type, ## __VA_ARGS__); \
285 285
         encoderRateMultiplierEnabled = true; \
286 286
         lastEncoderMovementMillis = 0; \
287
-        _MENU_ITEM_PART_2(type, ## __VA_ARGS__); \
287
+        _MENU_ITEM_PART_2(type, label, ## __VA_ARGS__); \
288 288
       } while(0)
289 289
 
290 290
   #else // !ENCODER_RATE_MULTIPLIER
@@ -581,8 +581,6 @@ void lcd_status_screen() {
581 581
     #endif
582 582
   #endif // LCD_PROGRESS_BAR
583 583
 
584
-  lcd_implementation_status_screen();
585
-
586 584
   #if ENABLED(ULTIPANEL)
587 585
 
588 586
     if (lcd_clicked) {
@@ -595,6 +593,7 @@ void lcd_status_screen() {
595 593
         #endif
596 594
       );
597 595
       lcd_goto_screen(lcd_main_menu);
596
+      return;
598 597
     }
599 598
 
600 599
     #if ENABLED(ULTIPANEL_FEEDMULTIPLY)
@@ -623,6 +622,8 @@ void lcd_status_screen() {
623 622
     feedrate_percentage = constrain(feedrate_percentage, 10, 999);
624 623
 
625 624
   #endif // ULTIPANEL
625
+
626
+  lcd_implementation_status_screen();
626 627
 }
627 628
 
628 629
 /**

Загрузка…
Отмена
Сохранить