瀏覽代碼

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
   {
3065
   {
3066
     lastMotorCheck = millis();
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
     #if EXTRUDERS > 2
3069
     #if EXTRUDERS > 2
3070
        || !READ(E2_ENABLE_PIN)
3070
        || !READ(E2_ENABLE_PIN)
3071
     #endif
3071
     #endif

+ 3
- 1
Marlin/temperature.cpp 查看文件

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

+ 4
- 0
Marlin/temperature.h 查看文件

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

Loading…
取消
儲存