Browse Source

continue loading command

PavelSindler 6 years ago
parent
commit
68f2e22dad
3 changed files with 10 additions and 2 deletions
  1. 1 1
      Firmware/Marlin_main.cpp
  2. 8 1
      Firmware/mmu.cpp
  3. 1 0
      Firmware/mmu.h

+ 1 - 1
Firmware/Marlin_main.cpp

@@ -6808,7 +6808,7 @@ if (mmu_enabled)
 		  mmu_command(MMU_CMD_T0 + tmp_extruder);
 
 		  manage_response(true, true);
-
+		  mmu_command(MMU_CMD_C0);
     	  mmu_extruder = tmp_extruder; //filament change is finished
 
 		  if (*(strchr_pointer + index) == '?')// for single material usage with mmu

+ 8 - 1
Firmware/mmu.cpp

@@ -162,6 +162,12 @@ void mmu_loop(void)
 				mmu_printf_P(PSTR("T%d\n"), extruder);
 				mmu_state = 3; // wait for response
 			}
+			else if (mmu_cmd == MMU_CMD_C0)
+			{
+				printf_P(PSTR("MMU <= 'C0'\n"));
+				mmu_puts_P(PSTR("C0\n")); //send continue loading
+				mmu_state = 3;
+			}
 			mmu_cmd = 0;
 		}
 		else if ((mmu_last_response + 1000) < millis()) //request every 1s
@@ -188,7 +194,7 @@ void mmu_loop(void)
 	case 3: //response to commands T0-T4
 		if (mmu_rx_ok() > 0)
 		{
-			printf_P(PSTR("MMU => 'ok'\n"), mmu_finda);
+			printf_P(PSTR("MMU => 'ok'\n"));
 			mmu_ready = true;
 			mmu_state = 1;
 		}
@@ -395,6 +401,7 @@ void mmu_M600_load_filament(bool automatic)
 		  mmu_command(MMU_CMD_T0 + tmp_extruder);
 
 		  manage_response(false, true);
+		  mmu_command(MMU_CMD_C0);
     	  mmu_extruder = tmp_extruder; //filament change is finished
 
 		  mmu_load_to_nozzle();

+ 1 - 0
Firmware/mmu.h

@@ -23,6 +23,7 @@ extern int16_t mmu_buildnr;
 #define MMU_CMD_T2   0x12
 #define MMU_CMD_T3   0x13
 #define MMU_CMD_T4   0x14
+#define MMU_CMD_C0	 0x30
 
 extern int mmu_puts_P(const char* str);