Browse Source

Reporty busy: paused for user in case MMU is not responding.

Marek Bel 5 years ago
parent
commit
4bfa3d7e0b
2 changed files with 5 additions and 0 deletions
  1. 2 0
      Firmware/mmu.cpp
  2. 3 0
      Firmware/tmc2130.cpp

+ 2 - 0
Firmware/mmu.cpp

@@ -679,6 +679,7 @@ void manage_response(bool move_axes, bool turn_off_nozzle, uint8_t move)
 				  st_synchronize();
 				  mmu_print_saved = true;
 				  printf_P(PSTR("MMU not responding\n"));
+				  KEEPALIVE_STATE(PAUSED_FOR_USER);
 				  hotend_temp_bckp = degTargetHotend(active_extruder);
 				  if (move_axes) {
 					  z_position_bckp = current_position[Z_AXIS];
@@ -735,6 +736,7 @@ void manage_response(bool move_axes, bool turn_off_nozzle, uint8_t move)
 		  }
 		  else if (mmu_print_saved) {
 			  printf_P(PSTR("MMU starts responding\n"));
+			  KEEPALIVE_STATE(IN_HANDLER);
 			  mmu_loading_flag = false;
 			  if (turn_off_nozzle) 
 			  {

+ 3 - 0
Firmware/tmc2130.cpp

@@ -715,6 +715,9 @@ uint8_t tmc2130_get_pwr(uint8_t axis)
 	return 0;
 }
 
+//! @par pwr motor power
+//!  * 0 disabled
+//!  * non-zero enabled
 void tmc2130_set_pwr(uint8_t axis, uint8_t pwr)
 {
 	switch (axis)