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
       SERIAL_ECHO_START;
670
       SERIAL_ECHO_START;
671
       SERIAL_ECHOLN(time);
671
       SERIAL_ECHOLN(time);
672
       LCD_MESSAGE(time);
672
       LCD_MESSAGE(time);
673
+      autotempShutdown();
673
     }
674
     }
674
     break;
675
     break;
675
     case 42: //M42 -Change pin status via gcode
676
     case 42: //M42 -Change pin status via gcode

+ 1
- 0
Marlin/cardreader.pde View File

436
  {
436
  {
437
    finishAndDisableSteppers();
437
    finishAndDisableSteppers();
438
  }
438
  }
439
+ autotempShutdown();
439
 }
440
 }
440
 #endif //SDSUPPORT
441
 #endif //SDSUPPORT

+ 1
- 1
Marlin/planner.cpp View File

91
 #ifdef AUTOTEMP
91
 #ifdef AUTOTEMP
92
     float autotemp_max=250;
92
     float autotemp_max=250;
93
     float autotemp_min=210;
93
     float autotemp_min=210;
94
-    float autotemp_factor=1;
94
+    float autotemp_factor=0.1;
95
     bool autotemp_enabled=false;
95
     bool autotemp_enabled=false;
96
 #endif
96
 #endif
97
 
97
 

+ 10
- 0
Marlin/temperature.h View File

108
 };
108
 };
109
 FORCE_INLINE bool isCoolingBed() {return target_raw[TEMPSENSOR_BED] < current_raw[TEMPSENSOR_BED];};
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
 void disable_heater();
121
 void disable_heater();
112
 void setWatch();
122
 void setWatch();
113
 void updatePID();
123
 void updatePID();

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


Loading…
Cancel
Save