diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 08a15ef2a1..74e30dc94f 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1410,11 +1415,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index b8c0255365..d1181551bd 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -187,6 +187,10 @@ volatile bool wait_for_heatup = true; volatile bool wait_for_user = false; #endif +#if HAS_AUTO_REPORTING + bool suspend_auto_report; // = false +#endif + // Inactivity shutdown millis_t max_inactive_time = 0, stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL; @@ -519,10 +523,6 @@ void idle( gcode.host_keepalive(); #endif - #if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED) - thermalManager.auto_report_temperatures(); - #endif - manage_inactivity( #if ENABLED(ADVANCED_PAUSE_FEATURE) no_stepper_sleep @@ -547,13 +547,20 @@ void idle( } #endif - #if ENABLED(AUTO_REPORT_SD_STATUS) - card.auto_report_sd_status(); - #endif - #ifdef HAL_IDLETASK HAL_idletask(); #endif + + #if HAS_AUTO_REPORTING + if (!suspend_auto_report) { + #if ENABLED(AUTO_REPORT_TEMPERATURES) + thermalManager.auto_report_temperatures(); + #endif + #if ENABLED(AUTO_REPORT_SD_STATUS) + card.auto_report_sd_status(); + #endif + } + #endif } /** diff --git a/Marlin/src/Marlin.h b/Marlin/src/Marlin.h index bf56c79d83..f5b14a97fe 100644 --- a/Marlin/src/Marlin.h +++ b/Marlin/src/Marlin.h @@ -188,6 +188,10 @@ extern volatile bool wait_for_heatup; extern volatile bool wait_for_user; #endif +#if HAS_AUTO_REPORTING + extern bool suspend_auto_report; +#endif + #if ENABLED(AUTO_BED_LEVELING_UBL) typedef struct { double A, B, D; } linear_fit; linear_fit* lsf_linear_fit(double x[], double y[], double z[], const int); diff --git a/Marlin/src/config/default/Configuration_adv.h b/Marlin/src/config/default/Configuration_adv.h index 293bc576b3..1adaa6398a 100644 --- a/Marlin/src/config/default/Configuration_adv.h +++ b/Marlin/src/config/default/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h index 6f0f1e275f..cc42dd4acd 100644 --- a/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h +++ b/Marlin/src/config/examples/AlephObjects/TAZ4/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h index b891c7548d..1a171138b3 100644 --- a/Marlin/src/config/examples/Anet/A6/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A6/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h index 32fe7b0233..d64fd29754 100644 --- a/Marlin/src/config/examples/Anet/A8/Configuration_adv.h +++ b/Marlin/src/config/examples/Anet/A8/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h index 293bc576b3..1adaa6398a 100644 --- a/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h +++ b/Marlin/src/config/examples/Azteeg/X5GT/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h index 976c8a6753..4d4cc4bd2b 100644 --- a/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h +++ b/Marlin/src/config/examples/BIBO/TouchX/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h index c731d05ab4..6318c34ba1 100644 --- a/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1414,11 +1419,6 @@ */ #define EXTENDED_CAPABILITIES_REPORT -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Disable all Volumetric extrusion options */ diff --git a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h index b41769b6f8..b5bb62677d 100644 --- a/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/Hephestos_2/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h index 174322c2ff..6318c34ba1 100644 --- a/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h +++ b/Marlin/src/config/examples/BQ/WITBOX/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Cartesio/Configuration_adv.h b/Marlin/src/config/examples/Cartesio/Configuration_adv.h index 2b88d33ff1..b9a0e40a4e 100644 --- a/Marlin/src/config/examples/Cartesio/Configuration_adv.h +++ b/Marlin/src/config/examples/Cartesio/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h index a6d3f03425..40eaf7a461 100755 --- a/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1412,11 +1417,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h index 1a9da6a7c0..a3da782377 100644 --- a/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10S/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h index 97366e551d..d80c90603e 100644 --- a/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/CR-10mini/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h index 6be8cf5369..5ada72ad49 100644 --- a/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-2/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h index ec26cc65b6..24f35fef1d 100644 --- a/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h +++ b/Marlin/src/config/examples/Creality/Ender-4/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/Felix/Configuration_adv.h b/Marlin/src/config/examples/Felix/Configuration_adv.h index d348f243e4..443ecfecbc 100644 --- a/Marlin/src/config/examples/Felix/Configuration_adv.h +++ b/Marlin/src/config/examples/Felix/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h index da88fbdff7..6ecf9eec55 100644 --- a/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h +++ b/Marlin/src/config/examples/FolgerTech/i3-2020/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h index e7b4d61123..af304a78de 100644 --- a/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h +++ b/Marlin/src/config/examples/Infitary/i3-M508/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** diff --git a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h index ad70145a26..430f6542e0 100644 --- a/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h +++ b/Marlin/src/config/examples/JGAurora/A5/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/MakerParts/Configuration_adv.h b/Marlin/src/config/examples/MakerParts/Configuration_adv.h index 6150890a03..801075f6ee 100644 --- a/Marlin/src/config/examples/MakerParts/Configuration_adv.h +++ b/Marlin/src/config/examples/MakerParts/Configuration_adv.h @@ -612,6 +612,11 @@ */ #define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1410,11 +1415,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h index 83fb60d85a..769403174c 100644 --- a/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M150/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h index 64d24e2068..e503930394 100644 --- a/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h +++ b/Marlin/src/config/examples/Malyan/M200/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h index d414587b95..6e1976c6d2 100644 --- a/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h +++ b/Marlin/src/config/examples/Micromake/C1/enhanced/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h index 79f7c1ad78..d6fbdd6c43 100644 --- a/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h +++ b/Marlin/src/config/examples/Mks/Sbase/Configuration_adv.h @@ -613,6 +613,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1417,11 +1422,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/RigidBot/Configuration_adv.h b/Marlin/src/config/examples/RigidBot/Configuration_adv.h index 07c0b16055..7bb39171bb 100644 --- a/Marlin/src/config/examples/RigidBot/Configuration_adv.h +++ b/Marlin/src/config/examples/RigidBot/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/SCARA/Configuration_adv.h b/Marlin/src/config/examples/SCARA/Configuration_adv.h index b3dff56022..439a138c44 100644 --- a/Marlin/src/config/examples/SCARA/Configuration_adv.h +++ b/Marlin/src/config/examples/SCARA/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h index a003057482..7886855949 100644 --- a/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h +++ b/Marlin/src/config/examples/Sanguinololu/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/TheBorg/Configuration_adv.h b/Marlin/src/config/examples/TheBorg/Configuration_adv.h index 6cc2bc0b6a..f885186fae 100644 --- a/Marlin/src/config/examples/TheBorg/Configuration_adv.h +++ b/Marlin/src/config/examples/TheBorg/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h index 2dbd9e34a5..237324c4d5 100644 --- a/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h +++ b/Marlin/src/config/examples/TinyBoy2/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h index f2f43938a0..dcf965e871 100644 --- a/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h +++ b/Marlin/src/config/examples/UltiMachine/Archim2/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h index 91e1f8e32f..a8ad33e893 100644 --- a/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8200/Configuration_adv.h @@ -625,6 +625,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1422,11 +1427,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h index fbb1ecafbc..8f3c60edaf 100644 --- a/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h +++ b/Marlin/src/config/examples/Velleman/K8400/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h index 22ffd0fe24..132588080d 100644 --- a/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h +++ b/Marlin/src/config/examples/Wanhao/Duplicator 6/Configuration_adv.h @@ -614,6 +614,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1411,11 +1416,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h index f54b04b9bf..019573aa60 100644 --- a/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h @@ -614,6 +614,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1411,11 +1416,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h index f54b04b9bf..019573aa60 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel/Configuration_adv.h @@ -614,6 +614,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1411,11 +1416,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h index fdf756f2d6..a09899838d 100644 --- a/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h @@ -614,6 +614,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1411,11 +1416,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/delta/generic/Configuration_adv.h b/Marlin/src/config/examples/delta/generic/Configuration_adv.h index fdf756f2d6..a09899838d 100644 --- a/Marlin/src/config/examples/delta/generic/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/generic/Configuration_adv.h @@ -614,6 +614,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1411,11 +1416,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h index fdf756f2d6..a09899838d 100644 --- a/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_mini/Configuration_adv.h @@ -614,6 +614,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1411,11 +1416,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h index cafd719d99..a584ab9688 100644 --- a/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_pro/Configuration_adv.h @@ -619,6 +619,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1416,11 +1421,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h index ead0aaed70..30a7f66f2e 100644 --- a/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h +++ b/Marlin/src/config/examples/delta/kossel_xl/Configuration_adv.h @@ -614,6 +614,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1411,11 +1416,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h index 99453b1bc7..d030c61e43 100644 --- a/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h +++ b/Marlin/src/config/examples/gCreate/gMax1.5+/Configuration_adv.h @@ -612,6 +612,11 @@ */ #define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/makibox/Configuration_adv.h b/Marlin/src/config/examples/makibox/Configuration_adv.h index 6612ec84dc..9e75247c23 100644 --- a/Marlin/src/config/examples/makibox/Configuration_adv.h +++ b/Marlin/src/config/examples/makibox/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h index e98c47e28c..eff6383801 100644 --- a/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h +++ b/Marlin/src/config/examples/tvrrug/Round2/Configuration_adv.h @@ -612,6 +612,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1409,11 +1414,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/config/examples/wt150/Configuration_adv.h b/Marlin/src/config/examples/wt150/Configuration_adv.h index f41ef6403b..637a951353 100644 --- a/Marlin/src/config/examples/wt150/Configuration_adv.h +++ b/Marlin/src/config/examples/wt150/Configuration_adv.h @@ -613,6 +613,11 @@ */ //#define SD_REPRINT_LAST_SELECTED_FILE + /** + * Auto-report SdCard status with M27 S + */ + //#define AUTO_REPORT_SD_STATUS + #endif // SDSUPPORT /** @@ -1410,11 +1415,6 @@ */ #define AUTO_REPORT_TEMPERATURES -/** - * Auto-report SdCard status with M27 S - */ -//#define AUTO_REPORT_SD_STATUS - /** * Include capabilities in M115 output */ diff --git a/Marlin/src/feature/bedlevel/ubl/ubl.cpp b/Marlin/src/feature/bedlevel/ubl/ubl.cpp index 44a88fc47f..2b7aaf2f7c 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl.cpp @@ -195,6 +195,10 @@ // 2 : disply of the map data on a RepRap Graphical LCD Panel void unified_bed_leveling::display_map(const int map_type) { + #if HAS_AUTO_REPORTING + suspend_auto_report = true; + #endif + constexpr uint8_t spaces = 8 * (GRID_MAX_POINTS_X - 2); SERIAL_PROTOCOLPGM("\nBed Topography Report"); @@ -259,6 +263,10 @@ serial_echo_xy(GRID_MAX_POINTS_X - 1, 0); SERIAL_EOL(); } + + #if HAS_AUTO_REPORTING + suspend_auto_report = false; + #endif } bool unified_bed_leveling::sanity_check() { diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 45f7dc6108..938488996e 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -391,7 +391,7 @@ void GcodeSuite::process_parsed_command() { KEEPALIVE_STATE(NOT_BUSY); return; // "ok" already printed - #if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED) + #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR case 155: M155(); break; // M155: Set temperature auto-report interval #endif diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h index 296c0f3f47..bdef7dfca2 100644 --- a/Marlin/src/gcode/gcode.h +++ b/Marlin/src/gcode/gcode.h @@ -547,7 +547,7 @@ private: static void M150(); #endif - #if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED) + #if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR static void M155(); #endif diff --git a/Marlin/src/gcode/temperature/M105.cpp b/Marlin/src/gcode/temperature/M105.cpp index 36d4d67ac5..2c569e2888 100644 --- a/Marlin/src/gcode/temperature/M105.cpp +++ b/Marlin/src/gcode/temperature/M105.cpp @@ -37,7 +37,7 @@ void GcodeSuite::M105() { const int16_t port = command_queue_port[cmd_queue_index_r]; #endif - #if HAS_TEMP_HOTEND || HAS_TEMP_BED + #if HAS_TEMP_SENSOR SERIAL_PROTOCOLPGM_P(port, MSG_OK); thermalManager.print_heaterstates( #if NUM_SERIAL > 1 diff --git a/Marlin/src/gcode/temperature/M155.cpp b/Marlin/src/gcode/temperature/M155.cpp index d97e7b9ae9..611676a672 100644 --- a/Marlin/src/gcode/temperature/M155.cpp +++ b/Marlin/src/gcode/temperature/M155.cpp @@ -22,7 +22,7 @@ #include "../../inc/MarlinConfig.h" -#if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED) +#if ENABLED(AUTO_REPORT_TEMPERATURES) && HAS_TEMP_SENSOR #include "../gcode.h" #include "../../module/temperature.h" @@ -37,4 +37,4 @@ void GcodeSuite::M155() { } -#endif // AUTO_REPORT_TEMPERATURES && (HAS_TEMP_HOTEND || HAS_TEMP_BED) +#endif // AUTO_REPORT_TEMPERATURES && HAS_TEMP_SENSOR diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h index 25a7d4086f..beb4d178cc 100644 --- a/Marlin/src/inc/Conditionals_post.h +++ b/Marlin/src/inc/Conditionals_post.h @@ -754,6 +754,7 @@ #define HAS_TEMP_4 (PIN_EXISTS(TEMP_4) && TEMP_SENSOR_4 != 0 && TEMP_SENSOR_4 > -2) #define HAS_TEMP_HOTEND (HAS_TEMP_0 || ENABLED(HEATER_0_USES_MAX6675)) #define HAS_TEMP_BED (PIN_EXISTS(TEMP_BED) && TEMP_SENSOR_BED != 0 && TEMP_SENSOR_BED > -2) +#define HAS_TEMP_SENSOR (HAS_TEMP_HOTEND || HAS_TEMP_BED) // Heaters #define HAS_HEATER_0 (PIN_EXISTS(HEATER_0)) @@ -816,6 +817,12 @@ #define HAS_DIGIPOTSS (PIN_EXISTS(DIGIPOTSS)) #define HAS_MOTOR_CURRENT_PWM (PIN_EXISTS(MOTOR_CURRENT_PWM_XY) || PIN_EXISTS(MOTOR_CURRENT_PWM_Z) || PIN_EXISTS(MOTOR_CURRENT_PWM_E)) +#if !HAS_TEMP_SENSOR + #undef AUTO_REPORT_TEMPERATURES +#endif + +#define HAS_AUTO_REPORTING (ENABLED(AUTO_REPORT_TEMPERATURES) || ENABLED(AUTO_REPORT_SD_STATUS)) + /** * This setting is also used by M109 when trying to calculate * a ballpark safe margin to prevent wait-forever situation. diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index bdee6e6bb0..fdefeeff04 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -417,7 +417,7 @@ uint8_t Temperature::soft_pwm_amount[HOTENDS], // Report heater states every 2 seconds if (ELAPSED(ms, next_temp_ms)) { - #if HAS_TEMP_HOTEND || HAS_TEMP_BED + #if HAS_TEMP_SENSOR print_heaterstates(); SERIAL_EOL(); #endif @@ -2144,7 +2144,7 @@ void Temperature::isr() { ENABLE_TEMPERATURE_INTERRUPT(); //re-enable Temperature ISR } -#if HAS_TEMP_HOTEND || HAS_TEMP_BED +#if HAS_TEMP_SENSOR #include "../gcode/gcode.h" @@ -2251,4 +2251,4 @@ void Temperature::isr() { #endif // AUTO_REPORT_TEMPERATURES -#endif // HAS_TEMP_HOTEND || HAS_TEMP_BED +#endif // HAS_TEMP_SENSOR diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 9709ddff81..b92140c26a 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -564,7 +564,7 @@ class Temperature { #endif // HEATER_IDLE_HANDLER - #if HAS_TEMP_HOTEND || HAS_TEMP_BED + #if HAS_TEMP_SENSOR static void print_heaterstates( #if NUM_SERIAL > 1 const int8_t port = -1