|
@ -686,14 +686,16 @@ void setup_killpin() { |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void setup_filrunoutpin() { |
|
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR) |
|
|
#if HAS_FILRUNOUT |
|
|
|
|
|
|
|
|
void setup_filrunoutpin() { |
|
|
pinMode(FILRUNOUT_PIN, INPUT); |
|
|
pinMode(FILRUNOUT_PIN, INPUT); |
|
|
#if ENABLED(ENDSTOPPULLUP_FIL_RUNOUT) |
|
|
#if ENABLED(ENDSTOPPULLUP_FIL_RUNOUT) |
|
|
WRITE(FILRUNOUT_PIN, HIGH); |
|
|
WRITE(FILRUNOUT_PIN, HIGH); |
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
// Set home pin
|
|
|
// Set home pin
|
|
|
void setup_homepin(void) { |
|
|
void setup_homepin(void) { |
|
@ -802,8 +804,12 @@ void setup() { |
|
|
MCUCR = 0x80; |
|
|
MCUCR = 0x80; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR) |
|
|
|
|
|
setup_filrunoutpin(); |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
setup_killpin(); |
|
|
setup_killpin(); |
|
|
setup_filrunoutpin(); |
|
|
|
|
|
setup_powerhold(); |
|
|
setup_powerhold(); |
|
|
|
|
|
|
|
|
#if HAS_STEPPER_RESET |
|
|
#if HAS_STEPPER_RESET |
|
@ -8144,7 +8150,7 @@ void idle( |
|
|
*/ |
|
|
*/ |
|
|
void manage_inactivity(bool ignore_stepper_queue/*=false*/) { |
|
|
void manage_inactivity(bool ignore_stepper_queue/*=false*/) { |
|
|
|
|
|
|
|
|
#if HAS_FILRUNOUT |
|
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR) |
|
|
if (IS_SD_PRINTING && !(READ(FILRUNOUT_PIN) ^ FIL_RUNOUT_INVERTING)) |
|
|
if (IS_SD_PRINTING && !(READ(FILRUNOUT_PIN) ^ FIL_RUNOUT_INVERTING)) |
|
|
handle_filament_runout(); |
|
|
handle_filament_runout(); |
|
|
#endif |
|
|
#endif |
|
|