Explorar o código

Also move host_keepalive to manage_inactivity()

This avoids the "busy" output interleaving with regular output in very
rare scenarios.

We should focus in finding which calls are not using manage_inactivity()
properly instead of working it around.
Yuri D'Elia %!s(int64=3) %!d(string=hai) anos
pai
achega
eafdf6c216
Modificáronse 2 ficheiros con 2 adicións e 6 borrados
  1. 1 0
      Firmware/Marlin_main.cpp
  2. 1 6
      Firmware/temperature.cpp

+ 1 - 0
Firmware/Marlin_main.cpp

@@ -9909,6 +9909,7 @@ if(0)
 #if defined(AUTO_REPORT)
   host_autoreport();
 #endif //AUTO_REPORT
+  host_keepalive();
 }
 
 void kill(const char *full_screen_message, unsigned char id)

+ 1 - 6
Firmware/temperature.cpp

@@ -567,10 +567,7 @@ void checkFanSpeed()
 	static unsigned char fan_speed_errors[2] = { 0,0 };
 #if (defined(FANCHECK) && defined(TACH_0) && (TACH_0 >-1))
 	if ((fan_speed[0] < 20) && (current_temperature[0] > EXTRUDER_AUTO_FAN_TEMPERATURE)){ fan_speed_errors[0]++;}
-	else{
-    fan_speed_errors[0] = 0;
-    host_keepalive();
-  }
+	else fan_speed_errors[0] = 0;
 #endif
 #if (defined(FANCHECK) && defined(TACH_1) && (TACH_1 >-1))
 	if ((fan_speed[1] < 5) && ((blocks_queued() ? block_buffer[block_buffer_tail].fan_speed : fanSpeed) > MIN_PRINT_FAN_SPEED)) fan_speed_errors[1]++;
@@ -902,8 +899,6 @@ void manage_heater()
 		timer02_set_pwm0(soft_pwm_bed << 1);
 	  }
   #endif
-  
-  host_keepalive();
 }
 
 #define PGM_RD_W(x)   (short)pgm_read_word(&x)