Browse Source

Report sd card progress [FR] #9751 (#9832)

* SD Status auto-report feature
Feature Request #9751
TheSFReader 7 years ago
parent
commit
eb079959fb
50 changed files with 282 additions and 3 deletions
  1. 4
    0
      Marlin/src/Marlin.cpp
  2. 5
    0
      Marlin/src/config/default/Configuration_adv.h
  3. 5
    0
      Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h
  4. 5
    0
      Marlin/src/config/examples/Anet/A6/Configuration_adv.h
  5. 5
    0
      Marlin/src/config/examples/Anet/A8/Configuration_adv.h
  6. 5
    0
      Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h
  7. 5
    0
      Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h
  8. 5
    0
      Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h
  9. 5
    0
      Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h
  10. 5
    0
      Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h
  11. 5
    0
      Marlin/src/config/examples/Cartesio/Configuration_adv.h
  12. 5
    0
      Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h
  13. 5
    0
      Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h
  14. 5
    0
      Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h
  15. 5
    0
      Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h
  16. 5
    0
      Marlin/src/config/examples/Felix/Configuration_adv.h
  17. 5
    0
      Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h
  18. 5
    0
      Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h
  19. 5
    0
      Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h
  20. 5
    0
      Marlin/src/config/examples/MakerParts/Configuration_adv.h
  21. 5
    0
      Marlin/src/config/examples/Malyan/M150/Configuration_adv.h
  22. 5
    0
      Marlin/src/config/examples/Malyan/M200/Configuration_adv.h
  23. 5
    0
      Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h
  24. 5
    0
      Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h
  25. 5
    0
      Marlin/src/config/examples/RigidBot/Configuration_adv.h
  26. 5
    0
      Marlin/src/config/examples/SCARA/Configuration_adv.h
  27. 5
    0
      Marlin/src/config/examples/Sanguinololu/Configuration_adv.h
  28. 5
    0
      Marlin/src/config/examples/TheBorg/Configuration_adv.h
  29. 5
    0
      Marlin/src/config/examples/TinyBoy2/Configuration_adv.h
  30. 5
    0
      Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h
  31. 5
    0
      Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h
  32. 5
    0
      Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h
  33. 5
    0
      Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  34. 5
    0
      Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  35. 5
    0
      Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h
  36. 5
    0
      Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  37. 5
    0
      Marlin/src/config/examples/delta/generic/Configuration_adv.h
  38. 5
    0
      Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h
  39. 5
    0
      Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h
  40. 5
    0
      Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h
  41. 5
    0
      Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h
  42. 5
    0
      Marlin/src/config/examples/makibox/Configuration_adv.h
  43. 5
    0
      Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h
  44. 5
    0
      Marlin/src/config/examples/wt150/Configuration_adv.h
  45. 1
    1
      Marlin/src/gcode/gcode.h
  46. 7
    0
      Marlin/src/gcode/host/M115.cpp
  47. 8
    0
      Marlin/src/gcode/sdcard/M20-M30_M32-M34_M928.cpp
  48. 1
    1
      Marlin/src/lcd/ultralcd.cpp
  49. 21
    1
      Marlin/src/sd/cardreader.cpp
  50. 25
    0
      Marlin/src/sd/cardreader.h

+ 4
- 0
Marlin/src/Marlin.cpp View File

547
     }
547
     }
548
   #endif
548
   #endif
549
 
549
 
550
+  #if ENABLED(AUTO_REPORT_SD_STATUS)
551
+    card.auto_report_sd_status();
552
+  #endif
553
+
550
   #ifdef HAL_IDLETASK
554
   #ifdef HAL_IDLETASK
551
     HAL_idletask();
555
     HAL_idletask();
552
   #endif
556
   #endif

+ 5
- 0
Marlin/src/config/default/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Anet/A6/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Anet/A8/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h View File

1415
 #define EXTENDED_CAPABILITIES_REPORT
1415
 #define EXTENDED_CAPABILITIES_REPORT
1416
 
1416
 
1417
 /**
1417
 /**
1418
+ * Auto-report SdCard status with M27 S<seconds>
1419
+ */
1420
+//#define AUTO_REPORT_SD_STATUS
1421
+
1422
+/**
1418
  * Disable all Volumetric extrusion options
1423
  * Disable all Volumetric extrusion options
1419
  */
1424
  */
1420
 //#define NO_VOLUMETRICS
1425
 //#define NO_VOLUMETRICS

+ 5
- 0
Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Cartesio/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h View File

1413
 #define AUTO_REPORT_TEMPERATURES
1413
 #define AUTO_REPORT_TEMPERATURES
1414
 
1414
 
1415
 /**
1415
 /**
1416
+ * Auto-report SdCard status with M27 S<seconds>
1417
+ */
1418
+//#define AUTO_REPORT_SD_STATUS
1419
+
1420
+/**
1416
  * Include capabilities in M115 output
1421
  * Include capabilities in M115 output
1417
  */
1422
  */
1418
 #define EXTENDED_CAPABILITIES_REPORT
1423
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Felix/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h View File

1409
  */
1409
  */
1410
 //#define AUTO_REPORT_TEMPERATURES
1410
 //#define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
+
1413
+/**
1414
+ * Auto-report SdCard status with M27 S<seconds>
1415
+ */
1416
+//#define AUTO_REPORT_SD_STATUS
1412
 /**
1417
 /**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */

+ 5
- 0
Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/MakerParts/Configuration_adv.h View File

1411
 #define AUTO_REPORT_TEMPERATURES
1411
 #define AUTO_REPORT_TEMPERATURES
1412
 
1412
 
1413
 /**
1413
 /**
1414
+ * Auto-report SdCard status with M27 S<seconds>
1415
+ */
1416
+//#define AUTO_REPORT_SD_STATUS
1417
+
1418
+/**
1414
  * Include capabilities in M115 output
1419
  * Include capabilities in M115 output
1415
  */
1420
  */
1416
 #define EXTENDED_CAPABILITIES_REPORT
1421
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Malyan/M150/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Malyan/M200/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h View File

1418
 #define AUTO_REPORT_TEMPERATURES
1418
 #define AUTO_REPORT_TEMPERATURES
1419
 
1419
 
1420
 /**
1420
 /**
1421
+ * Auto-report SdCard status with M27 S<seconds>
1422
+ */
1423
+//#define AUTO_REPORT_SD_STATUS
1424
+
1425
+/**
1421
  * Include capabilities in M115 output
1426
  * Include capabilities in M115 output
1422
  */
1427
  */
1423
 #define EXTENDED_CAPABILITIES_REPORT
1428
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/RigidBot/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/SCARA/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Sanguinololu/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/TheBorg/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/TinyBoy2/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h View File

1423
 #define AUTO_REPORT_TEMPERATURES
1423
 #define AUTO_REPORT_TEMPERATURES
1424
 
1424
 
1425
 /**
1425
 /**
1426
+ * Auto-report SdCard status with M27 S<seconds>
1427
+ */
1428
+//#define AUTO_REPORT_SD_STATUS
1429
+
1430
+/**
1426
  * Include capabilities in M115 output
1431
  * Include capabilities in M115 output
1427
  */
1432
  */
1428
 #define EXTENDED_CAPABILITIES_REPORT
1433
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h View File

1412
 #define AUTO_REPORT_TEMPERATURES
1412
 #define AUTO_REPORT_TEMPERATURES
1413
 
1413
 
1414
 /**
1414
 /**
1415
+ * Auto-report SdCard status with M27 S<seconds>
1416
+ */
1417
+//#define AUTO_REPORT_SD_STATUS
1418
+
1419
+/**
1415
  * Include capabilities in M115 output
1420
  * Include capabilities in M115 output
1416
  */
1421
  */
1417
 #define EXTENDED_CAPABILITIES_REPORT
1422
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h View File

1412
 #define AUTO_REPORT_TEMPERATURES
1412
 #define AUTO_REPORT_TEMPERATURES
1413
 
1413
 
1414
 /**
1414
 /**
1415
+ * Auto-report SdCard status with M27 S<seconds>
1416
+ */
1417
+//#define AUTO_REPORT_SD_STATUS
1418
+
1419
+/**
1415
  * Include capabilities in M115 output
1420
  * Include capabilities in M115 output
1416
  */
1421
  */
1417
 #define EXTENDED_CAPABILITIES_REPORT
1422
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h View File

1412
 #define AUTO_REPORT_TEMPERATURES
1412
 #define AUTO_REPORT_TEMPERATURES
1413
 
1413
 
1414
 /**
1414
 /**
1415
+ * Auto-report SdCard status with M27 S<seconds>
1416
+ */
1417
+//#define AUTO_REPORT_SD_STATUS
1418
+
1419
+/**
1415
  * Include capabilities in M115 output
1420
  * Include capabilities in M115 output
1416
  */
1421
  */
1417
 #define EXTENDED_CAPABILITIES_REPORT
1422
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h View File

1412
 #define AUTO_REPORT_TEMPERATURES
1412
 #define AUTO_REPORT_TEMPERATURES
1413
 
1413
 
1414
 /**
1414
 /**
1415
+ * Auto-report SdCard status with M27 S<seconds>
1416
+ */
1417
+//#define AUTO_REPORT_SD_STATUS
1418
+
1419
+/**
1415
  * Include capabilities in M115 output
1420
  * Include capabilities in M115 output
1416
  */
1421
  */
1417
 #define EXTENDED_CAPABILITIES_REPORT
1422
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/delta/generic/Configuration_adv.h View File

1412
 #define AUTO_REPORT_TEMPERATURES
1412
 #define AUTO_REPORT_TEMPERATURES
1413
 
1413
 
1414
 /**
1414
 /**
1415
+ * Auto-report SdCard status with M27 S<seconds>
1416
+ */
1417
+//#define AUTO_REPORT_SD_STATUS
1418
+
1419
+/**
1415
  * Include capabilities in M115 output
1420
  * Include capabilities in M115 output
1416
  */
1421
  */
1417
 #define EXTENDED_CAPABILITIES_REPORT
1422
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h View File

1412
 #define AUTO_REPORT_TEMPERATURES
1412
 #define AUTO_REPORT_TEMPERATURES
1413
 
1413
 
1414
 /**
1414
 /**
1415
+ * Auto-report SdCard status with M27 S<seconds>
1416
+ */
1417
+//#define AUTO_REPORT_SD_STATUS
1418
+
1419
+/**
1415
  * Include capabilities in M115 output
1420
  * Include capabilities in M115 output
1416
  */
1421
  */
1417
 #define EXTENDED_CAPABILITIES_REPORT
1422
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h View File

1417
 #define AUTO_REPORT_TEMPERATURES
1417
 #define AUTO_REPORT_TEMPERATURES
1418
 
1418
 
1419
 /**
1419
 /**
1420
+ * Auto-report SdCard status with M27 S<seconds>
1421
+ */
1422
+//#define AUTO_REPORT_SD_STATUS
1423
+
1424
+/**
1420
  * Include capabilities in M115 output
1425
  * Include capabilities in M115 output
1421
  */
1426
  */
1422
 #define EXTENDED_CAPABILITIES_REPORT
1427
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h View File

1412
 #define AUTO_REPORT_TEMPERATURES
1412
 #define AUTO_REPORT_TEMPERATURES
1413
 
1413
 
1414
 /**
1414
 /**
1415
+ * Auto-report SdCard status with M27 S<seconds>
1416
+ */
1417
+//#define AUTO_REPORT_SD_STATUS
1418
+
1419
+/**
1415
  * Include capabilities in M115 output
1420
  * Include capabilities in M115 output
1416
  */
1421
  */
1417
 #define EXTENDED_CAPABILITIES_REPORT
1422
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/makibox/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h View File

1410
 #define AUTO_REPORT_TEMPERATURES
1410
 #define AUTO_REPORT_TEMPERATURES
1411
 
1411
 
1412
 /**
1412
 /**
1413
+ * Auto-report SdCard status with M27 S<seconds>
1414
+ */
1415
+//#define AUTO_REPORT_SD_STATUS
1416
+
1417
+/**
1413
  * Include capabilities in M115 output
1418
  * Include capabilities in M115 output
1414
  */
1419
  */
1415
 #define EXTENDED_CAPABILITIES_REPORT
1420
 #define EXTENDED_CAPABILITIES_REPORT

+ 5
- 0
Marlin/src/config/examples/wt150/Configuration_adv.h View File

1411
 #define AUTO_REPORT_TEMPERATURES
1411
 #define AUTO_REPORT_TEMPERATURES
1412
 
1412
 
1413
 /**
1413
 /**
1414
+ * Auto-report SdCard status with M27 S<seconds>
1415
+ */
1416
+//#define AUTO_REPORT_SD_STATUS
1417
+
1418
+/**
1414
  * Include capabilities in M115 output
1419
  * Include capabilities in M115 output
1415
  */
1420
  */
1416
 #define EXTENDED_CAPABILITIES_REPORT
1421
 #define EXTENDED_CAPABILITIES_REPORT

+ 1
- 1
Marlin/src/gcode/gcode.h View File

85
  * M24  - Start/resume SD print. (Requires SDSUPPORT)
85
  * M24  - Start/resume SD print. (Requires SDSUPPORT)
86
  * M25  - Pause SD print. (Requires SDSUPPORT)
86
  * M25  - Pause SD print. (Requires SDSUPPORT)
87
  * M26  - Set SD position in bytes: "M26 S12345". (Requires SDSUPPORT)
87
  * M26  - Set SD position in bytes: "M26 S12345". (Requires SDSUPPORT)
88
- * M27  - Report SD print status. (Requires SDSUPPORT)
88
+ * M27  - Report SD print status. (Requires SDSUPPORT) With 'S<seconds>' sets the SD status auto-report interval. (Requires AUTO_REPORT_SD_STATUS)
89
  * M28  - Start SD write: "M28 /path/file.gco". (Requires SDSUPPORT)
89
  * M28  - Start SD write: "M28 /path/file.gco". (Requires SDSUPPORT)
90
  * M29  - Stop SD write. (Requires SDSUPPORT)
90
  * M29  - Stop SD write. (Requires SDSUPPORT)
91
  * M30  - Delete file from SD: "M30 /path/file.gco"
91
  * M30  - Delete file from SD: "M30 /path/file.gco"

+ 7
- 0
Marlin/src/gcode/host/M115.cpp View File

139
       #endif
139
       #endif
140
     );
140
     );
141
 
141
 
142
+    // AUTOREPORT_SD_STATUS (M27 extension)
143
+    cap_line(PSTR("AUTOREPORT_SD_STATUS")
144
+      #if ENABLED(AUTO_REPORT_SD_STATUS)
145
+        , true
146
+      #endif
147
+    );
148
+
142
   #endif // EXTENDED_CAPABILITIES_REPORT
149
   #endif // EXTENDED_CAPABILITIES_REPORT
143
 }
150
 }

+ 8
- 0
Marlin/src/gcode/sdcard/M20-M30_M32-M34_M928.cpp View File

115
       command_queue_port[cmd_queue_index_r]
115
       command_queue_port[cmd_queue_index_r]
116
     #endif
116
     #endif
117
   );
117
   );
118
+  #if ENABLED(AUTO_REPORT_SD_STATUS)
119
+  if (parser.seenval('S'))
120
+    card.set_auto_report_interval(parser.value_byte()
121
+      #if NUM_SERIAL > 1
122
+        , command_queue_port[cmd_queue_index_r]
123
+      #endif
124
+    );
125
+  #endif
118
 }
126
 }
119
 
127
 
120
 /**
128
 /**

+ 1
- 1
Marlin/src/lcd/ultralcd.cpp View File

2603
           _lcd_goto_ubl_level_bed
2603
           _lcd_goto_ubl_level_bed
2604
         #else
2604
         #else
2605
           _lcd_ubl_level_bed
2605
           _lcd_ubl_level_bed
2606
-        #endif        
2606
+        #endif
2607
       );
2607
       );
2608
     #elif ENABLED(LCD_BED_LEVELING)
2608
     #elif ENABLED(LCD_BED_LEVELING)
2609
       #if ENABLED(PROBE_MANUALLY)
2609
       #if ENABLED(PROBE_MANUALLY)

+ 21
- 1
Marlin/src/sd/cardreader.cpp View File

536
     const int8_t port/*= -1*/
536
     const int8_t port/*= -1*/
537
   #endif
537
   #endif
538
 ) {
538
 ) {
539
-  if (cardOK) {
539
+  if (cardOK && sdprinting) {
540
     SERIAL_PROTOCOLPGM_P(port, MSG_SD_PRINTING_BYTE);
540
     SERIAL_PROTOCOLPGM_P(port, MSG_SD_PRINTING_BYTE);
541
     SERIAL_PROTOCOL_P(port, sdpos);
541
     SERIAL_PROTOCOL_P(port, sdpos);
542
     SERIAL_PROTOCOLCHAR_P(port, '/');
542
     SERIAL_PROTOCOLCHAR_P(port, '/');
947
   }
947
   }
948
 }
948
 }
949
 
949
 
950
+#if ENABLED(AUTO_REPORT_SD_STATUS)
951
+  uint8_t CardReader::auto_report_sd_interval = 0;
952
+  millis_t CardReader::next_sd_report_ms;
953
+  #if NUM_SERIAL > 1
954
+    int8_t CardReader::serialport;
955
+  #endif
956
+
957
+  void CardReader::auto_report_sd_status() {
958
+    millis_t current_ms = millis();
959
+    if (auto_report_sd_interval && ELAPSED(current_ms, next_sd_report_ms)) {
960
+      next_sd_report_ms = current_ms + 1000UL * auto_report_sd_interval;
961
+      getStatus(
962
+        #if NUM_SERIAL > 1
963
+          serialport
964
+        #endif
965
+      );
966
+    }
967
+  }
968
+#endif // AUTO_REPORT_SD_STATUS
969
+
950
 #endif // SDSUPPORT
970
 #endif // SDSUPPORT

+ 25
- 0
Marlin/src/sd/cardreader.h View File

99
   FORCE_INLINE char* getWorkDirName() { workDir.getFilename(filename); return filename; }
99
   FORCE_INLINE char* getWorkDirName() { workDir.getFilename(filename); return filename; }
100
 
100
 
101
   Sd2Card& getSd2Card() { return card; }
101
   Sd2Card& getSd2Card() { return card; }
102
+
103
+  #if ENABLED(AUTO_REPORT_SD_STATUS)
104
+    void auto_report_sd_status(void);
105
+    FORCE_INLINE void set_auto_report_interval(uint8_t v
106
+      #if NUM_SERIAL > 1
107
+        , int8_t port
108
+      #endif
109
+    ) {
110
+      #if NUM_SERIAL > 1
111
+        serialport = port;
112
+      #endif
113
+      NOMORE(v, 60);
114
+      auto_report_sd_interval = v;
115
+      next_sd_report_ms = millis() + 1000UL * v;
116
+    }
117
+  #endif
118
+
102
 public:
119
 public:
103
   bool saving, logging, sdprinting, cardOK, filenameIsDir;
120
   bool saving, logging, sdprinting, cardOK, filenameIsDir;
104
   char filename[FILENAME_LENGTH], longFilename[LONG_FILENAME_LENGTH];
121
   char filename[FILENAME_LENGTH], longFilename[LONG_FILENAME_LENGTH];
183
   #if ENABLED(SDCARD_SORT_ALPHA)
200
   #if ENABLED(SDCARD_SORT_ALPHA)
184
     void flush_presort();
201
     void flush_presort();
185
   #endif
202
   #endif
203
+
204
+  #if ENABLED(AUTO_REPORT_SD_STATUS)
205
+    static uint8_t auto_report_sd_interval;
206
+    static millis_t next_sd_report_ms;
207
+    #if NUM_SERIAL > 1
208
+      static int8_t serialport;
209
+    #endif
210
+  #endif
186
 };
211
 };
187
 
212
 
188
 #if PIN_EXISTS(SD_DETECT)
213
 #if PIN_EXISTS(SD_DETECT)

Loading…
Cancel
Save