Browse Source

fixed problems in planner with solenoids for BariCUDA when set to 0

Jordan Miller 11 years ago
parent
commit
37f3199df3
1 changed files with 19 additions and 2 deletions
  1. 19
    2
      Marlin/planner.cpp

+ 19
- 2
Marlin/planner.cpp View File

@@ -495,12 +495,29 @@ void check_axes_activity()
495 495
 
496 496
 #if HEATER_1_PIN > -1
497 497
     if (ValvePressure != 0){
498
-      analogWrite(HEATER_1_PIN,ValvePressure); // If buffer is empty use current fan speed
498
+      analogWrite(HEATER_1_PIN,ValvePressure); // If buffer is empty use current valve pressure
499
+    }
500
+
501
+    if((ValvePressure == 0) && (valve_pressure ==0)) {
502
+      analogWrite(HEATER_1_PIN, 0);
503
+    }
504
+
505
+    if (ValvePressure != 0 && tail_valve_pressure !=0) { 
506
+      analogWrite(HEATER_1_PIN,tail_valve_pressure);
499 507
     }
500 508
 #endif
509
+
501 510
 #if HEATER_2_PIN > -1
502 511
     if (EtoPPressure != 0){
503
-      analogWrite(HEATER_2_PIN,EtoPPressure); // If buffer is empty use current fan speed
512
+      analogWrite(HEATER_2_PIN,EtoPPressure); // If buffer is empty use current EtoP pressure
513
+    }
514
+
515
+    if((EtoPPressure == 0) && (e_to_p_pressure ==0)) {
516
+      analogWrite(HEATER_2_PIN, 0);
517
+    }
518
+
519
+    if (EtoPPressure != 0 && tail_e_to_p_pressure !=0) { 
520
+      analogWrite(HEATER_2_PIN,tail_e_to_p_pressure);
504 521
     }
505 522
 #endif
506 523
 }

Loading…
Cancel
Save