Browse Source

Fixed MAX6675

Erik van der Zalm 13 years ago
parent
commit
cf7c8c458f
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      Marlin/temperature.cpp

+ 5
- 3
Marlin/temperature.cpp View File

153
   float max, min;
153
   float max, min;
154
   
154
   
155
   SERIAL_ECHOLN("PID Autotune start");
155
   SERIAL_ECHOLN("PID Autotune start");
156
-
156
+  
157
+  disable_heater(); // switch off all heaters.
158
+  
157
   for(;;) {
159
   for(;;) {
158
 
160
 
159
     if(temp_meas_ready == true) { // temp sample ready
161
     if(temp_meas_ready == true) { // temp sample ready
921
     
923
     
922
   if(temp_count >= 16) // 8 ms * 16 = 128ms.
924
   if(temp_count >= 16) // 8 ms * 16 = 128ms.
923
   {
925
   {
924
-    #ifdef HEATER_0_USES_AD595
926
+    #ifdef HEATER_0_USES_AD595 || defined HEATER_0_USES_MAX6675
925
       current_raw[0] = raw_temp_0_value;
927
       current_raw[0] = raw_temp_0_value;
926
     #else
928
     #else
927
       current_raw[0] = 16383 - raw_temp_0_value;
929
       current_raw[0] = 16383 - raw_temp_0_value;
928
     #endif
930
     #endif
929
 
931
 
930
 #if EXTRUDERS > 1    
932
 #if EXTRUDERS > 1    
931
-    #ifdef HEATER_1_USES_AD595 || defined HEATER_0_USES_MAX6675
933
+    #ifdef HEATER_1_USES_AD595
932
       current_raw[1] = raw_temp_1_value;
934
       current_raw[1] = raw_temp_1_value;
933
     #else
935
     #else
934
       current_raw[1] = 16383 - raw_temp_1_value;
936
       current_raw[1] = 16383 - raw_temp_1_value;

Loading…
Cancel
Save