From bdca8681a09089ffa0a2394614c70510878bb065 Mon Sep 17 00:00:00 2001 From: InsanityAutomation Date: Mon, 14 Mar 2022 09:29:53 -0400 Subject: [PATCH] Reorganize config options, remove obsolete option. --- Marlin/Configuration.h | 39 ++++++++++++++++-------------------- Marlin/src/inc/SanityCheck.h | 2 ++ 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 3f01a88f02..b857fabf0d 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1764,7 +1764,7 @@ * Marlin knows a print job is running when: * 1. Running a print job from media started with M24. * 2. The Print Job Timer has been started with M75. - * 3. The heaters were turned on and PRINTJOB_TIMER_AUTOSTART is enabled. + * 3. The heaters were turned on with a wait command (M109) and PRINTJOB_TIMER_AUTOSTART is enabled. * * RAMPS-based boards use SERVO3_PIN for the first runout sensor. * For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc. @@ -1772,13 +1772,25 @@ //#define FILAMENT_RUNOUT_SENSOR #if ENABLED(FILAMENT_RUNOUT_SENSOR) //#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each. - #define FIL_RUNOUT_ENABLED { true } // Default enabled state for sensors E0[, E1[, E2[, E3...]]]. Override with M591 followed by M500. - #define FIL_RUNOUT_MODE { 1 } // Default mode for sensors E0[, E1[, E2[, E3...]]]. 0:NONE 1:Switch NO 2:Switch NC 7:Motion Sensor - #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. - //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. + #define FIL_RUNOUT_ENABLED { true } // Default enabled state for sensors E0[, E1[, E2[, E3...]]]. Override with M591EnnSn followed by M500. + #define FIL_RUNOUT_MODE { 1 } // Default mode for sensors E0[, E1[, E2[, E3...]]]. 0:NONE 1:Switch NO 2:Switch NC 7:Motion Sensor Override with M591EnPnn //#define WATCH_ALL_RUNOUT_SENSORS // Execute runout script on any triggering sensor, not only for the active extruder. // This is automatically enabled for MIXING_EXTRUDERs. + // Commands to execute on filament runout. + // With multiple runout sensors use the %c placeholder for the current tool in commands (e.g., "M600 T%c") + // NOTE: After 'M591 H1' the host handles filament runout and this script does not apply. + #define FILAMENT_RUNOUT_SCRIPT "M600" + + // In Mode 1 or 2, continue printing this length of filament after a run out occurs before executing the + // runout script. Useful for a sensor at the end of a feed tube or debounce on a flakey sensor. + // In Mode 7, extrusion distance to expect a change of state. + // Override with M591EnLnn + #define FIL_RUNOUT_DISTANCE_MM { 15 } + + #define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins. + //#define FIL_RUNOUT_PULLDOWN // Use internal pulldown for filament runout pins. + // Override individually if the runout sensors vary //#define FIL_RUNOUT1_PULLUP //#define FIL_RUNOUT1_PULLDOWN @@ -1803,23 +1815,6 @@ //#define FIL_RUNOUT8_PULLUP //#define FIL_RUNOUT8_PULLDOWN - - // Commands to execute on filament runout. - // With multiple runout sensors use the %c placeholder for the current tool in commands (e.g., "M600 T%c") - // NOTE: After 'M591 H1' the host handles filament runout and this script does not apply. - #define FILAMENT_RUNOUT_SCRIPT "M600" - - // After a runout is detected, continue printing this length of filament - // before executing the runout script. Useful for a sensor at the end of - // a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead. - #define FIL_RUNOUT_DISTANCE_MM { 15 } - - #ifdef FIL_RUNOUT_DISTANCE_MM - // Enable this option to use an encoder disc that toggles the runout pin - // as the filament moves. (Be sure to make FIL_RUNOUT_DISTANCE_MM long - // enough to avoid false positives.) - //#define FILAMENT_MOTION_SENSOR - #endif #endif //=========================================================================== diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h index 0e10f9d119..0f306e6bfc 100644 --- a/Marlin/src/inc/SanityCheck.h +++ b/Marlin/src/inc/SanityCheck.h @@ -1136,6 +1136,8 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS #error "FIL_RUNOUT8_STATE LOW is now set with FIL_RUNOUT_MODE { n, n, n, n, n, n, n, 1 ... }." #endif #endif + #elif ENABLED(FILAMENT_MOTION_SENSOR) + #error "FILAMENT_MOTION_SENSOR is now set with FIL_RUNOUT_MODE { 7 ... }." #endif #endif