Browse Source

Add autotemp capabilities to M104

This allows M104 to pass the F and B parameters to enable autotemp as well
Florian Heilmann 8 years ago
parent
commit
d08867986e
3 changed files with 8 additions and 4 deletions
  1. 5
    1
      Marlin/Marlin_main.cpp
  2. 2
    2
      Marlin/planner.cpp
  3. 1
    1
      Marlin/planner.h

+ 5
- 1
Marlin/Marlin_main.cpp View File

5089
 
5089
 
5090
     if (code_value_temp_abs() > thermalManager.degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING);
5090
     if (code_value_temp_abs() > thermalManager.degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING);
5091
   }
5091
   }
5092
+  
5093
+  #if ENABLED(AUTOTEMP)
5094
+    planner.autotemp_M104_M109();
5095
+  #endif
5092
 }
5096
 }
5093
 
5097
 
5094
 #if HAS_TEMP_HOTEND || HAS_TEMP_BED
5098
 #if HAS_TEMP_HOTEND || HAS_TEMP_BED
5284
   }
5288
   }
5285
 
5289
 
5286
   #if ENABLED(AUTOTEMP)
5290
   #if ENABLED(AUTOTEMP)
5287
-    planner.autotemp_M109();
5291
+    planner.autotemp_M104_M109();
5288
   #endif
5292
   #endif
5289
 
5293
 
5290
   #if TEMP_RESIDENCY_TIME > 0
5294
   #if TEMP_RESIDENCY_TIME > 0

+ 2
- 2
Marlin/planner.cpp View File

1361
 
1361
 
1362
 #if ENABLED(AUTOTEMP)
1362
 #if ENABLED(AUTOTEMP)
1363
 
1363
 
1364
-  void Planner::autotemp_M109() {
1364
+  void Planner::autotemp_M104_M109() {
1365
     autotemp_enabled = code_seen('F');
1365
     autotemp_enabled = code_seen('F');
1366
     if (autotemp_enabled) autotemp_factor = code_value_temp_diff();
1366
     if (autotemp_enabled) autotemp_factor = code_value_temp_diff();
1367
     if (code_seen('S')) autotemp_min = code_value_temp_abs();
1367
     if (code_seen('S')) autotemp_min = code_value_temp_abs();
1379
     SERIAL_EOL;
1379
     SERIAL_EOL;
1380
   }
1380
   }
1381
 
1381
 
1382
-#endif
1382
+#endif

+ 1
- 1
Marlin/planner.h View File

372
       static float autotemp_factor;
372
       static float autotemp_factor;
373
       static bool autotemp_enabled;
373
       static bool autotemp_enabled;
374
       static void getHighESpeed();
374
       static void getHighESpeed();
375
-      static void autotemp_M109();
375
+      static void autotemp_M104_M109();
376
     #endif
376
     #endif
377
 
377
 
378
   private:
378
   private:

Loading…
Cancel
Save