Browse Source

Tweak scrolling message code

Scott Lahteine 8 years ago
parent
commit
789b2928a8
2 changed files with 4 additions and 4 deletions
  1. 2
    2
      Marlin/ultralcd_impl_DOGM.h
  2. 2
    2
      Marlin/ultralcd_impl_HD44780.h

+ 2
- 2
Marlin/ultralcd_impl_DOGM.h View File

@@ -410,8 +410,8 @@ inline void lcd_implementation_status_message() {
410 410
     const uint8_t slen = lcd_strlen(lcd_status_message);
411 411
     if (slen > LCD_WIDTH) {
412 412
       // Skip any non-printing bytes
413
-      while (!PRINTABLE(lcd_status_message[status_scroll_pos])) ++status_scroll_pos;
414
-      if (++status_scroll_pos > slen - LCD_WIDTH) status_scroll_pos = 0;
413
+      while (!PRINTABLE(lcd_status_message[status_scroll_pos++])) { /* nada */ }
414
+      if (status_scroll_pos > slen - LCD_WIDTH) status_scroll_pos = 0;
415 415
     }
416 416
   #else
417 417
     lcd_print_utf(lcd_status_message);

+ 2
- 2
Marlin/ultralcd_impl_HD44780.h View File

@@ -829,8 +829,8 @@ static void lcd_implementation_status_screen() {
829 829
     const uint8_t slen = lcd_strlen(lcd_status_message);
830 830
     if (slen > LCD_WIDTH) {
831 831
       // Skip any non-printing bytes
832
-      while (!PRINTABLE(lcd_status_message[status_scroll_pos])) ++status_scroll_pos;
833
-      if (++status_scroll_pos > slen - LCD_WIDTH) status_scroll_pos = 0;
832
+      while (!PRINTABLE(lcd_status_message[status_scroll_pos++])) { /* nada */ }
833
+      if (status_scroll_pos > slen - LCD_WIDTH) status_scroll_pos = 0;
834 834
     }
835 835
   #else
836 836
     lcd_print_utf(lcd_status_message);

Loading…
Cancel
Save