Bläddra i källkod

Add SCROLL_LONG_FILENAMES option

Scott Lahteine 6 år sedan
förälder
incheckning
783ddf9691
37 ändrade filer med 204 tillägg och 45 borttagningar
  1. 2
    2
      .travis.yml
  2. 3
    0
      Marlin/Configuration_adv.h
  3. 3
    0
      Marlin/src/config/default/Configuration_adv.h
  4. 3
    0
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  5. 3
    0
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  6. 3
    0
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  7. 3
    0
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  8. 3
    0
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  9. 3
    0
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  10. 3
    0
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  11. 3
    0
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  12. 3
    0
      Marlin/src/config/examples/Felix/Configuration_adv.h
  13. 3
    0
      Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h
  14. 3
    0
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  15. 3
    0
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  16. 3
    0
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  17. 3
    0
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  18. 3
    0
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  19. 3
    0
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  20. 3
    0
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  21. 3
    0
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  22. 3
    0
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  23. 3
    0
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  24. 3
    0
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  25. 3
    0
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  26. 3
    0
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  27. 3
    0
      Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
  28. 3
    0
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  29. 3
    0
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  30. 3
    0
      Marlin/src/config/examples/makibox/Configuration_adv.h
  31. 3
    0
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  32. 3
    0
      Marlin/src/config/examples/wt150/Configuration_adv.h
  33. 17
    3
      Marlin/src/lcd/ultralcd.cpp
  34. 23
    6
      Marlin/src/lcd/ultralcd_impl_DOGM.h
  35. 25
    6
      Marlin/src/lcd/ultralcd_impl_HD44780.h
  36. 1
    1
      Marlin/src/sd/SdBaseFile.cpp
  37. 43
    27
      Marlin/src/sd/SdFatConfig.h

+ 2
- 2
.travis.yml Visa fil

@@ -230,7 +230,7 @@ script:
230 230
   #
231 231
   - restore_configs
232 232
   - opt_enable G3D_PANEL SDSUPPORT
233
-  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING
233
+  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES
234 234
   - opt_set_adv SDSORT_GCODE true
235 235
   - opt_set_adv SDSORT_USES_RAM true
236 236
   - opt_set_adv SDSORT_USES_STACK true
@@ -241,7 +241,7 @@ script:
241 241
   #
242 242
   - restore_configs
243 243
   - opt_enable REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER SDSUPPORT
244
-  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING
244
+  - opt_enable_adv SDCARD_SORT_ALPHA STATUS_MESSAGE_SCROLLING SCROLL_LONG_FILENAMES
245 245
   - build_marlin_pio ${TRAVIS_BUILD_DIR} ${TEST_PLATFORM}
246 246
   #
247 247
   # REPRAPWORLD_KEYPAD

+ 3
- 0
Marlin/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/default/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/Anet/A6/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/Anet/A8/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h Visa fil

@@ -552,6 +552,9 @@
552 552
   // This allows hosts to request long names for files and folders with M33
553 553
   #define LONG_FILENAME_HOST_SUPPORT
554 554
 
555
+  // Enable this option to scroll long filenames in the SD card menu
556
+  //#define SCROLL_LONG_FILENAMES
557
+
555 558
   // This option allows you to abort SD printing when any endstop is triggered.
556 559
   // This feature must be enabled with "M540 S1" or from the LCD menu.
557 560
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/Cartesio/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/Felix/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/Folger Tech/i3-2020/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h Visa fil

@@ -552,6 +552,9 @@
552 552
   // This allows hosts to request long names for files and folders with M33
553 553
   #define LONG_FILENAME_HOST_SUPPORT
554 554
 
555
+  // Enable this option to scroll long filenames in the SD card menu
556
+  //#define SCROLL_LONG_FILENAMES
557
+
555 558
   // This option allows you to abort SD printing when any endstop is triggered.
556 559
   // This feature must be enabled with "M540 S1" or from the LCD menu.
557 560
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/RigidBot/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/SCARA/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h Visa fil

@@ -544,6 +544,9 @@
544 544
   // This allows hosts to request long names for files and folders with M33
545 545
   //#define LONG_FILENAME_HOST_SUPPORT
546 546
 
547
+  // Enable this option to scroll long filenames in the SD card menu
548
+  //#define SCROLL_LONG_FILENAMES
549
+
547 550
   // This option allows you to abort SD printing when any endstop is triggered.
548 551
   // This feature must be enabled with "M540 S1" or from the LCD menu.
549 552
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h Visa fil

@@ -565,6 +565,9 @@
565 565
   // This allows hosts to request long names for files and folders with M33
566 566
   #define LONG_FILENAME_HOST_SUPPORT
567 567
 
568
+  // Enable this option to scroll long filenames in the SD card menu
569
+  //#define SCROLL_LONG_FILENAMES
570
+
568 571
   // This option allows you to abort SD printing when any endstop is triggered.
569 572
   // This feature must be enabled with "M540 S1" or from the LCD menu.
570 573
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h Visa fil

@@ -557,6 +557,9 @@
557 557
   // This allows hosts to request long names for files and folders with M33
558 558
   //#define LONG_FILENAME_HOST_SUPPORT
559 559
 
560
+  // Enable this option to scroll long filenames in the SD card menu
561
+  //#define SCROLL_LONG_FILENAMES
562
+
560 563
   // This option allows you to abort SD printing when any endstop is triggered.
561 564
   // This feature must be enabled with "M540 S1" or from the LCD menu.
562 565
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h Visa fil

@@ -557,6 +557,9 @@
557 557
   // This allows hosts to request long names for files and folders with M33
558 558
   //#define LONG_FILENAME_HOST_SUPPORT
559 559
 
560
+  // Enable this option to scroll long filenames in the SD card menu
561
+  //#define SCROLL_LONG_FILENAMES
562
+
560 563
   // This option allows you to abort SD printing when any endstop is triggered.
561 564
   // This feature must be enabled with "M540 S1" or from the LCD menu.
562 565
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/delta/generic/Configuration_adv.h Visa fil

@@ -557,6 +557,9 @@
557 557
   // This allows hosts to request long names for files and folders with M33
558 558
   //#define LONG_FILENAME_HOST_SUPPORT
559 559
 
560
+  // Enable this option to scroll long filenames in the SD card menu
561
+  //#define SCROLL_LONG_FILENAMES
562
+
560 563
   // This option allows you to abort SD printing when any endstop is triggered.
561 564
   // This feature must be enabled with "M540 S1" or from the LCD menu.
562 565
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h Visa fil

@@ -557,6 +557,9 @@
557 557
   // This allows hosts to request long names for files and folders with M33
558 558
   //#define LONG_FILENAME_HOST_SUPPORT
559 559
 
560
+  // Enable this option to scroll long filenames in the SD card menu
561
+  //#define SCROLL_LONG_FILENAMES
562
+
560 563
   // This option allows you to abort SD printing when any endstop is triggered.
561 564
   // This feature must be enabled with "M540 S1" or from the LCD menu.
562 565
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h Visa fil

@@ -562,6 +562,9 @@
562 562
   // This allows hosts to request long names for files and folders with M33
563 563
   //#define LONG_FILENAME_HOST_SUPPORT
564 564
 
565
+  // Enable this option to scroll long filenames in the SD card menu
566
+  //#define SCROLL_LONG_FILENAMES
567
+
565 568
   // This option allows you to abort SD printing when any endstop is triggered.
566 569
   // This feature must be enabled with "M540 S1" or from the LCD menu.
567 570
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h Visa fil

@@ -557,6 +557,9 @@
557 557
   // This allows hosts to request long names for files and folders with M33
558 558
   //#define LONG_FILENAME_HOST_SUPPORT
559 559
 
560
+  // Enable this option to scroll long filenames in the SD card menu
561
+  //#define SCROLL_LONG_FILENAMES
562
+
560 563
   // This option allows you to abort SD printing when any endstop is triggered.
561 564
   // This feature must be enabled with "M540 S1" or from the LCD menu.
562 565
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/makibox/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 3
- 0
Marlin/src/config/examples/wt150/Configuration_adv.h Visa fil

@@ -555,6 +555,9 @@
555 555
   // This allows hosts to request long names for files and folders with M33
556 556
   //#define LONG_FILENAME_HOST_SUPPORT
557 557
 
558
+  // Enable this option to scroll long filenames in the SD card menu
559
+  //#define SCROLL_LONG_FILENAMES
560
+
558 561
   // This option allows you to abort SD printing when any endstop is triggered.
559 562
   // This feature must be enabled with "M540 S1" or from the LCD menu.
560 563
   // To have any effect, endstops must be enabled during SD printing.

+ 17
- 3
Marlin/src/lcd/ultralcd.cpp Visa fil

@@ -76,12 +76,16 @@ int16_t lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_spe
76 76
   #endif
77 77
 #endif
78 78
 
79
-uint8_t lcd_status_message_level;
79
+uint8_t lcd_status_update_delay = 1, // First update one loop delayed
80
+        lcd_status_message_level;    // Higher level overrides lower
80 81
 char lcd_status_message[3 * (LCD_WIDTH) + 1] = WELCOME_MSG; // worst case is kana with up to 3*LCD_WIDTH+1
81 82
 
82 83
 #if ENABLED(STATUS_MESSAGE_SCROLLING)
83 84
   uint8_t status_scroll_pos = 0;
84 85
 #endif
86
+#if ENABLED(SCROLL_LONG_FILENAMES)
87
+  uint8_t filename_scroll_pos, filename_scroll_max, filename_scroll_hash;
88
+#endif
85 89
 
86 90
 #if ENABLED(LCD_SET_PROGRESS_MANUALLY)
87 91
   uint8_t progress_bar_percent;
@@ -4665,7 +4669,6 @@ void lcd_update() {
4665 4669
 
4666 4670
     // We arrive here every ~100ms when idling often enough.
4667 4671
     // Instead of tracking the changes simply redraw the Info Screen ~1 time a second.
4668
-    static int8_t lcd_status_update_delay = 1; // first update one loop delayed
4669 4672
     if (
4670 4673
       #if ENABLED(ULTIPANEL)
4671 4674
         currentScreen == lcd_status_screen &&
@@ -4681,6 +4684,17 @@ void lcd_update() {
4681 4684
       lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
4682 4685
     }
4683 4686
 
4687
+    #if ENABLED(SCROLL_LONG_FILENAMES)
4688
+      // If scrolling of long file names is enabled and we are in the sd card menu,
4689
+      // cause a refresh to occur until all the text has scrolled into view.
4690
+      if (currentScreen == lcd_sdcard_menu && filename_scroll_pos < filename_scroll_max && !lcd_status_update_delay--) {
4691
+        lcd_status_update_delay = 6;
4692
+        lcdDrawUpdate = LCDVIEW_REDRAW_NOW;
4693
+        filename_scroll_pos++;
4694
+        return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS;
4695
+      }
4696
+    #endif
4697
+
4684 4698
     // then we want to use 1/2 of the time only.
4685 4699
     uint16_t bbr2 = planner.block_buffer_runtime() >> 1;
4686 4700
 
@@ -4765,7 +4779,7 @@ void lcd_update() {
4765 4779
   } // ELAPSED(ms, next_lcd_update_ms)
4766 4780
 }
4767 4781
 
4768
-void pad_message_string() {
4782
+inline void pad_message_string() {
4769 4783
   uint8_t i = 0, j = 0;
4770 4784
   char c;
4771 4785
   while ((c = lcd_status_message[i]) && j < LCD_WIDTH) {

+ 23
- 6
Marlin/src/lcd/ultralcd_impl_DOGM.h Visa fil

@@ -935,19 +935,36 @@ static void lcd_implementation_status_screen() {
935 935
 
936 936
       if (!PAGE_CONTAINS(row_y1, row_y2)) return;
937 937
 
938
-      uint8_t n = LCD_WIDTH - (START_COL) - 1;
938
+      constexpr uint8_t maxlen = LCD_WIDTH - (START_COL) - 1;
939
+      const char *outstr = longFilename[0] ? longFilename : filename;
939 940
       if (longFilename[0]) {
940
-        filename = longFilename;
941
-        longFilename[n] = '\0'; // cutoff at screen edge
941
+        #if ENABLED(SCROLL_LONG_FILENAMES)
942
+          if (isSelected) {
943
+            uint8_t name_hash = row;
944
+            for (uint8_t l = FILENAME_LENGTH; l--;)
945
+              name_hash = ((name_hash << 1) | (name_hash >> 7)) ^ filename[l];  // rotate, xor
946
+            if (filename_scroll_hash != name_hash) {                            // If the hash changed...
947
+              filename_scroll_hash = name_hash;                                 // Save the new hash
948
+              filename_scroll_max = max(0, lcd_strlen(longFilename) - maxlen);  // Update the scroll limit
949
+              filename_scroll_pos = 0;                                          // Reset scroll to the start
950
+              lcd_status_update_delay = 8;                                      // Don't scroll right away
951
+            }
952
+            outstr += filename_scroll_pos;
953
+          }
954
+        #else
955
+          longFilename[maxlen] = '\0'; // cutoff at screen edge
956
+        #endif
942 957
       }
943 958
 
944 959
       if (isDir) lcd_print(LCD_STR_FOLDER[0]);
945 960
 
946
-      while (char c = *filename) {
961
+      char c;
962
+      uint8_t n = maxlen;
963
+      while (n && (c = *outstr)) {
947 964
         n -= lcd_print_and_count(c);
948
-        filename++;
965
+        ++outstr;
949 966
       }
950
-      while (n--) u8g.print(' ');
967
+      while (n) { --n; u8g.print(' '); }
951 968
     }
952 969
 
953 970
     #define lcd_implementation_drawmenu_sdfile(sel, row, pstr, filename, longFilename) _drawmenu_sd(sel, row, pstr, filename, longFilename, false)

+ 25
- 6
Marlin/src/lcd/ultralcd_impl_HD44780.h Visa fil

@@ -991,18 +991,37 @@ static void lcd_implementation_status_screen() {
991 991
 
992 992
     static void lcd_implementation_drawmenu_sd(const bool sel, const uint8_t row, const char* const pstr, const char* filename, char* const longFilename, const uint8_t concat, const char post_char) {
993 993
       UNUSED(pstr);
994
-      uint8_t n = LCD_WIDTH - concat;
995 994
       lcd.setCursor(0, row);
996 995
       lcd.print(sel ? '>' : ' ');
996
+
997
+      uint8_t n = LCD_WIDTH - concat;
998
+      const char *outstr = longFilename[0] ? longFilename : filename;
997 999
       if (longFilename[0]) {
998
-        filename = longFilename;
999
-        longFilename[n] = '\0';
1000
+        #if ENABLED(SCROLL_LONG_FILENAMES)
1001
+          if (sel) {
1002
+            uint8_t name_hash = row;
1003
+            for (uint8_t l = FILENAME_LENGTH; l--;)
1004
+              name_hash = ((name_hash << 1) | (name_hash >> 7)) ^ filename[l];  // rotate, xor
1005
+            if (filename_scroll_hash != name_hash) {                            // If the hash changed...
1006
+              filename_scroll_hash = name_hash;                                 // Save the new hash
1007
+              filename_scroll_max = max(0, lcd_strlen(longFilename) - n);  // Update the scroll limit
1008
+              filename_scroll_pos = 0;                                          // Reset scroll to the start
1009
+              lcd_status_update_delay = 8;                                      // Don't scroll right away
1010
+            }
1011
+            outstr += filename_scroll_pos;
1012
+          }
1013
+        #else
1014
+          longFilename[n] = '\0'; // cutoff at screen edge
1015
+        #endif
1000 1016
       }
1001
-      while (char c = *filename) {
1017
+
1018
+      char c;
1019
+      while (n && (c = *outstr)) {
1002 1020
         n -= charset_mapper(c);
1003
-        filename++;
1021
+        ++outstr;
1004 1022
       }
1005
-      while (n--) lcd.write(' ');
1023
+      while (n) { --n; lcd.write(' '); }
1024
+
1006 1025
       lcd.print(post_char);
1007 1026
     }
1008 1027
 

+ 1
- 1
Marlin/src/sd/SdBaseFile.cpp Visa fil

@@ -1146,7 +1146,7 @@ int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) {
1146 1146
       vfat_t* VFAT = (vfat_t*)dir;
1147 1147
       // Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0
1148 1148
       if (VFAT->firstClusterLow == 0 && (VFAT->sequenceNumber & 0x1F) > 0 && (VFAT->sequenceNumber & 0x1F) <= MAX_VFAT_ENTRIES) {
1149
-        // TODO: Store the filename checksum to verify if a none-long filename aware system modified the file table.
1149
+        // TODO: Store the filename checksum to verify if a long-filename-unaware system modified the file table.
1150 1150
         n = ((VFAT->sequenceNumber & 0x1F) - 1) * (FILENAME_LENGTH);
1151 1151
         for (uint8_t i = 0; i < FILENAME_LENGTH; i++)
1152 1152
           longFilename[n + i] = (i < 5) ? VFAT->name1[i] : (i < 11) ? VFAT->name2[i - 5] : VFAT->name3[i - 11];

+ 43
- 27
Marlin/src/sd/SdFatConfig.h Visa fil

@@ -21,20 +21,20 @@
21 21
  */
22 22
 
23 23
 /**
24
+ * SdFatConfig.h
24 25
  * Arduino SdFat Library
25 26
  * Copyright (C) 2009 by William Greiman
26 27
  *
27 28
  * This file is part of the Arduino Sd2Card Library
28 29
  */
29 30
 
30
-/**
31
- * \file
32
- * \brief configuration definitions
33
- */
34
-#ifndef SDFATCONFIG_H
35
-#define SDFATCONFIG_H
31
+#ifndef _SDFATCONFIG_H_
32
+#define _SDFATCONFIG_H_
33
+
34
+#include "../inc/MarlinConfig.h"
36 35
 
37 36
 //------------------------------------------------------------------------------
37
+
38 38
 /**
39 39
  * To use multiple SD cards set USE_MULTIPLE_CARDS nonzero.
40 40
  *
@@ -43,7 +43,9 @@
43 43
  * Each card requires about 550 bytes of SRAM so use of a Mega is recommended.
44 44
  */
45 45
 #define USE_MULTIPLE_CARDS 0
46
+
46 47
 //------------------------------------------------------------------------------
48
+
47 49
 /**
48 50
  * Call flush for endl if ENDL_CALLS_FLUSH is nonzero
49 51
  *
@@ -62,30 +64,40 @@
62 64
  * all data to be written to the SD.
63 65
  */
64 66
 #define ENDL_CALLS_FLUSH 0
67
+
65 68
 //------------------------------------------------------------------------------
69
+
66 70
 /**
67 71
  * Allow use of deprecated functions if ALLOW_DEPRECATED_FUNCTIONS is nonzero
68 72
  */
69 73
 #define ALLOW_DEPRECATED_FUNCTIONS 1
74
+
70 75
 //------------------------------------------------------------------------------
76
+
71 77
 /**
72 78
  * Allow FAT12 volumes if FAT12_SUPPORT is nonzero.
73 79
  * FAT12 has not been well tested.
74 80
  */
75 81
 #define FAT12_SUPPORT 0
82
+
76 83
 //------------------------------------------------------------------------------
84
+
77 85
 /**
78 86
  * SPI init rate for SD initialization commands. Must be 5 (F_CPU/64)
79 87
  * or 6 (F_CPU/128).
80 88
  */
81 89
 #define SPI_SD_INIT_RATE 5
90
+
82 91
 //------------------------------------------------------------------------------
92
+
83 93
 /**
84 94
  * Set the SS pin high for hardware SPI.  If SS is chip select for another SPI
85 95
  * device this will disable that device during the SD init phase.
86 96
  */
87 97
 #define SET_SPI_SS_HIGH 1
98
+
88 99
 //------------------------------------------------------------------------------
100
+
89 101
 /**
90 102
  * Define MEGA_SOFT_SPI nonzero to use software SPI on Mega Arduinos.
91 103
  * Pins used are SS 10, MOSI 11, MISO 12, and SCK 13.
@@ -95,36 +107,40 @@
95 107
  * but many SD cards will fail with GPS Shield V1.0.
96 108
  */
97 109
 #define MEGA_SOFT_SPI 0
110
+
98 111
 //------------------------------------------------------------------------------
99
-/**
100
- * Set USE_SOFTWARE_SPI nonzero to always use software SPI.
101
- */
112
+
113
+// Set USE_SOFTWARE_SPI nonzero to ALWAYS use Software SPI.
102 114
 #define USE_SOFTWARE_SPI 0
103
-// define software SPI pins so Mega can use unmodified 168/328 shields
104
-/** Software SPI chip select pin for the SD */
105
-#define SOFT_SPI_CS_PIN 10
106
-/** Software SPI Master Out Slave In pin */
107
-#define SOFT_SPI_MOSI_PIN 11
108
-/** Software SPI Master In Slave Out pin */
109
-#define SOFT_SPI_MISO_PIN 12
110
-/** Software SPI Clock pin */
111
-#define SOFT_SPI_SCK_PIN 13
115
+
116
+// Define software SPI pins so Mega can use unmodified 168/328 shields
117
+#define SOFT_SPI_CS_PIN   10 // Software SPI chip select pin for the SD
118
+#define SOFT_SPI_MOSI_PIN 11 // Software SPI Master Out Slave In pin
119
+#define SOFT_SPI_MISO_PIN 12 // Software SPI Master In Slave Out pin
120
+#define SOFT_SPI_SCK_PIN  13 // Software SPI Clock pin
121
+
112 122
 //------------------------------------------------------------------------------
123
+
113 124
 /**
114 125
  * The __cxa_pure_virtual function is an error handler that is invoked when
115 126
  * a pure virtual function is called.
116 127
  */
117 128
 #define USE_CXA_PURE_VIRTUAL 1
118 129
 
119
-/** Number of UTF-16 characters per entry */
120
-#define FILENAME_LENGTH 13
121
-
122 130
 /**
123
- * Defines for long (vfat) filenames
131
+ * Defines for 8.3 and long (vfat) filenames
124 132
  */
125
-/** Number of VFAT entries used. Every entry has 13 UTF-16 characters */
126
-#define MAX_VFAT_ENTRIES (2)
127
-/** Total size of the buffer used to store the long filenames */
128
-#define LONG_FILENAME_LENGTH (FILENAME_LENGTH*MAX_VFAT_ENTRIES+1)
129 133
 
130
-#endif // SDFATCONFIG_H
134
+#define FILENAME_LENGTH 13 // Number of UTF-16 characters per entry
135
+
136
+// Number of VFAT entries used. Each entry has 13 UTF-16 characters
137
+#if ENABLED(SCROLL_LONG_FILENAMES)
138
+  #define MAX_VFAT_ENTRIES (5)
139
+#else
140
+  #define MAX_VFAT_ENTRIES (2)
141
+#endif
142
+
143
+// Total bytes needed to store a single long filename
144
+#define LONG_FILENAME_LENGTH (FILENAME_LENGTH * MAX_VFAT_ENTRIES + 1)
145
+
146
+#endif // _SDFATCONFIG_H_

Laddar…
Avbryt
Spara