|
|
|
@ -446,7 +446,7 @@ static uint8_t target_extruder;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
|
|
|
|
static bool filrunoutEnqueued = false;
|
|
|
|
|
static bool filament_ran_out = false;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
static bool send_ok[BUFSIZE];
|
|
|
|
@ -6105,7 +6105,7 @@ inline void gcode_M503() {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
|
|
|
|
filrunoutEnqueued = false;
|
|
|
|
|
filament_ran_out = false;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -7741,7 +7741,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
|
|
|
|
|
|
|
|
|
|
#if HAS_FILRUNOUT
|
|
|
|
|
if (IS_SD_PRINTING && !(READ(FILRUNOUT_PIN) ^ FIL_RUNOUT_INVERTING))
|
|
|
|
|
filrunout();
|
|
|
|
|
handle_filament_runout();
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if (commands_in_queue < BUFSIZE) get_available_commands();
|
|
|
|
@ -7924,9 +7924,9 @@ void kill(const char* lcd_msg) {
|
|
|
|
|
|
|
|
|
|
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
|
|
|
|
|
|
|
|
|
|
void filrunout() {
|
|
|
|
|
if (!filrunoutEnqueued) {
|
|
|
|
|
filrunoutEnqueued = true;
|
|
|
|
|
void handle_filament_runout() {
|
|
|
|
|
if (!filament_ran_out) {
|
|
|
|
|
filament_ran_out = true;
|
|
|
|
|
enqueue_and_echo_commands_P(PSTR(FILAMENT_RUNOUT_SCRIPT));
|
|
|
|
|
st_synchronize();
|
|
|
|
|
}
|
|
|
|
|