Parcourir la source

MK2 build fail fixed

PavelSindler il y a 5 ans
Parent
commit
2fe8e0670a
2 fichiers modifiés avec 7 ajouts et 2 suppressions
  1. 2 0
      Firmware/temperature.cpp
  2. 5 2
      Firmware/ultralcd.cpp

+ 2 - 0
Firmware/temperature.cpp

@@ -756,6 +756,7 @@ void manage_heater()
       (defined(EXTRUDER_2_AUTO_FAN_PIN) && EXTRUDER_2_AUTO_FAN_PIN > -1)
 
 #ifdef FAN_SOFT_PWM
+#ifdef FANCHECK
   if ((_millis() - extruder_autofan_last_check > FAN_CHECK_PERIOD) && (!fan_measuring)) {
 	  extruder_autofan_last_check = _millis();
 	  fanSpeedBckp = fanSpeedSoftPwm;
@@ -775,6 +776,7 @@ void manage_heater()
 	  extruder_autofan_last_check = _millis();
 	  fan_measuring = false;
   }
+#endif //FANCHECK
   checkExtruderAutoFans();
 #else //FAN_SOFT_PWM
   if(_millis() - extruder_autofan_last_check > 1000)  // only need to check fan state very infrequently

+ 5 - 2
Firmware/ultralcd.cpp

@@ -181,7 +181,9 @@ enum class testScreen
 static int  lcd_selftest_screen(testScreen screen, int _progress, int _progress_scale, bool _clear, int _delay);
 static void lcd_selftest_screen_step(int _row, int _col, int _state, const char *_name, const char *_indicator);
 static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite);
+#ifdef FAN_CHECK
 static bool lcd_selftest_fan_dialog(int _fan);
+#endif //FAN_CHECk
 static bool lcd_selftest_fsensor();
 static bool selftest_irsensor();
 static void lcd_selftest_error(int _error_no, const char *_error_1, const char *_error_2);
@@ -7338,12 +7340,11 @@ static bool lcd_selftest_manual_fan_check(int _fan, bool check_opposite)
 
 }
 
-
+#ifdef FANCHECK
 static bool lcd_selftest_fan_dialog(int _fan)
 {
 	bool _result = true;
 	int _errno = 7;
-
 	switch (_fan) {
 	case 0:
 		fanSpeed = 0;
@@ -7431,6 +7432,8 @@ static bool lcd_selftest_fan_dialog(int _fan)
 	return _result;
 }
 
+#endif //FANCHECK
+
 static int lcd_selftest_screen(testScreen screen, int _progress, int _progress_scale, bool _clear, int _delay)
 {