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
     const uint8_t slen = lcd_strlen(lcd_status_message);
410
     const uint8_t slen = lcd_strlen(lcd_status_message);
411
     if (slen > LCD_WIDTH) {
411
     if (slen > LCD_WIDTH) {
412
       // Skip any non-printing bytes
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
   #else
416
   #else
417
     lcd_print_utf(lcd_status_message);
417
     lcd_print_utf(lcd_status_message);

+ 2
- 2
Marlin/ultralcd_impl_HD44780.h View File

829
     const uint8_t slen = lcd_strlen(lcd_status_message);
829
     const uint8_t slen = lcd_strlen(lcd_status_message);
830
     if (slen > LCD_WIDTH) {
830
     if (slen > LCD_WIDTH) {
831
       // Skip any non-printing bytes
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
   #else
835
   #else
836
     lcd_print_utf(lcd_status_message);
836
     lcd_print_utf(lcd_status_message);

Loading…
Cancel
Save