소스 검색

Bed Heater monitoring in Controller Fan

In some cases the Bed Heater FET heats up more then stepper drivers, so
this change add the bed monitoring to the controller fan. As soon as the
bed heater is turned on, the controller fan will run as well.
Alex Borro 11 년 전
부모
커밋
5c44f6c434
3개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 1
    1
      Marlin/Marlin_main.cpp
  2. 3
    1
      Marlin/temperature.cpp
  3. 4
    0
      Marlin/temperature.h

+ 1
- 1
Marlin/Marlin_main.cpp 파일 보기

@@ -3065,7 +3065,7 @@ void controllerFan()
3065 3065
   {
3066 3066
     lastMotorCheck = millis();
3067 3067
 
3068
-    if(!READ(X_ENABLE_PIN) || !READ(Y_ENABLE_PIN) || !READ(Z_ENABLE_PIN)
3068
+    if(!READ(X_ENABLE_PIN) || !READ(Y_ENABLE_PIN) || !READ(Z_ENABLE_PIN) || (soft_pwm_bed > 0)
3069 3069
     #if EXTRUDERS > 2
3070 3070
        || !READ(E2_ENABLE_PIN)
3071 3071
     #endif

+ 3
- 1
Marlin/temperature.cpp 파일 보기

@@ -65,6 +65,8 @@ float current_temperature_bed = 0.0;
65 65
 #ifdef FAN_SOFT_PWM
66 66
   unsigned char fanSpeedSoftPwm;
67 67
 #endif
68
+
69
+unsigned char soft_pwm_bed;
68 70
   
69 71
 #ifdef BABYSTEPPING
70 72
   volatile int babystepsTodo[3]={0,0,0};
@@ -105,7 +107,7 @@ static volatile bool temp_meas_ready = false;
105 107
 	static unsigned long  previous_millis_bed_heater;
106 108
 #endif //PIDTEMPBED
107 109
   static unsigned char soft_pwm[EXTRUDERS];
108
-  static unsigned char soft_pwm_bed;
110
+
109 111
 #ifdef FAN_SOFT_PWM
110 112
   static unsigned char soft_pwm_fan;
111 113
 #endif

+ 4
- 0
Marlin/temperature.h 파일 보기

@@ -45,6 +45,10 @@ extern float current_temperature_bed;
45 45
   extern float redundant_temperature;
46 46
 #endif
47 47
 
48
+#if defined(CONTROLLERFAN_PIN) && CONTROLLERFAN_PIN > -1
49
+  extern unsigned char soft_pwm_bed;
50
+#endif
51
+
48 52
 #ifdef PIDTEMP
49 53
   extern float Kp,Ki,Kd,Kc;
50 54
   float scalePID_i(float i);

Loading…
취소
저장