Bläddra i källkod

Add autotemp capabilities to M104

This allows M104 to pass the F and B parameters to enable autotemp as well
Florian Heilmann 8 år sedan
förälder
incheckning
d08867986e
3 ändrade filer med 8 tillägg och 4 borttagningar
  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 Visa fil

@@ -5089,6 +5089,10 @@ inline void gcode_M104() {
5089 5089
 
5090 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 5098
 #if HAS_TEMP_HOTEND || HAS_TEMP_BED
@@ -5284,7 +5288,7 @@ inline void gcode_M109() {
5284 5288
   }
5285 5289
 
5286 5290
   #if ENABLED(AUTOTEMP)
5287
-    planner.autotemp_M109();
5291
+    planner.autotemp_M104_M109();
5288 5292
   #endif
5289 5293
 
5290 5294
   #if TEMP_RESIDENCY_TIME > 0

+ 2
- 2
Marlin/planner.cpp Visa fil

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

+ 1
- 1
Marlin/planner.h Visa fil

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

Laddar…
Avbryt
Spara