Kaynağa Gözat

Move extruder forth and back after filament detected by sensor to detect bad load.

Marek Bel 6 yıl önce
ebeveyn
işleme
326c8492b5
1 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. 6 1
      Firmware/mmu.cpp

+ 6 - 1
Firmware/mmu.cpp

@@ -1418,11 +1418,16 @@ static void load_more()
 {
     for (uint8_t i = 0; i < MMU_IDLER_SENSOR_ATTEMPTS_NR; i++)
     {
-        if (PIN_GET(IR_SENSOR_PIN) == 0) return;
+        if (PIN_GET(IR_SENSOR_PIN) == 0) break;
         DEBUG_PRINTF_P(PSTR("Additional load attempt nr. %d\n"), i);
         mmu_command(MmuCmd::C0);
         manage_response(true, true, MMU_LOAD_MOVE);
     }
+    current_position[E_AXIS] += 60;
+    plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], MMU_LOAD_FEEDRATE, active_extruder);
+    current_position[E_AXIS] -= 58;
+    plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], MMU_LOAD_FEEDRATE, active_extruder);
+    st_synchronize();
 }
 
 void mmu_continue_loading()