Browse Source

overworked autotemp, removed one layer of nesting from the ultralcd.

Bernhard 13 years ago
parent
commit
dfd240b260
5 changed files with 449 additions and 410 deletions
  1. 1
    0
      Marlin/Marlin.pde
  2. 1
    0
      Marlin/cardreader.pde
  3. 1
    1
      Marlin/planner.cpp
  4. 10
    0
      Marlin/temperature.h
  5. 436
    409
      Marlin/ultralcd.pde

+ 1
- 0
Marlin/Marlin.pde View File

@@ -670,6 +670,7 @@ FORCE_INLINE void process_commands()
670 670
       SERIAL_ECHO_START;
671 671
       SERIAL_ECHOLN(time);
672 672
       LCD_MESSAGE(time);
673
+      autotempShutdown();
673 674
     }
674 675
     break;
675 676
     case 42: //M42 -Change pin status via gcode

+ 1
- 0
Marlin/cardreader.pde View File

@@ -436,5 +436,6 @@ void CardReader::printingHasFinished()
436 436
  {
437 437
    finishAndDisableSteppers();
438 438
  }
439
+ autotempShutdown();
439 440
 }
440 441
 #endif //SDSUPPORT

+ 1
- 1
Marlin/planner.cpp View File

@@ -91,7 +91,7 @@ static float previous_nominal_speed; // Nominal speed of previous path line segm
91 91
 #ifdef AUTOTEMP
92 92
     float autotemp_max=250;
93 93
     float autotemp_min=210;
94
-    float autotemp_factor=1;
94
+    float autotemp_factor=0.1;
95 95
     bool autotemp_enabled=false;
96 96
 #endif
97 97
 

+ 10
- 0
Marlin/temperature.h View File

@@ -108,6 +108,16 @@ FORCE_INLINE float isCoolingHotend(uint8_t extruder){
108 108
 };
109 109
 FORCE_INLINE bool isCoolingBed() {return target_raw[TEMPSENSOR_BED] < current_raw[TEMPSENSOR_BED];};
110 110
 
111
+FORCE_INLINE void autotempShutdown(){
112
+ #ifdef AUTOTEMP
113
+ if(autotemp_enabled)
114
+ {
115
+  autotemp_enabled=false;
116
+  if(degTargetHotend0()>autotemp_min)
117
+    setTargetHotend0(0);
118
+ }
119
+ #endif
120
+}
111 121
 void disable_heater();
112 122
 void setWatch();
113 123
 void updatePID();

+ 436
- 409
Marlin/ultralcd.pde
File diff suppressed because it is too large
View File


Loading…
Cancel
Save