Quellcode durchsuchen

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 vor 11 Jahren
Ursprung
Commit
5c44f6c434
3 geänderte Dateien mit 8 neuen und 2 gelöschten Zeilen
  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 Datei anzeigen

@@ -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 Datei anzeigen

@@ -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 Datei anzeigen

@@ -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);

Laden…
Abbrechen
Speichern