Browse Source

Add autotemp capabilities to M104

This allows M104 to pass the F and B parameters to enable autotemp as well
pull/1/head
Florian Heilmann 8 years ago
committed by Scott Lahteine
parent
commit
d08867986e
  1. 6
      Marlin/Marlin_main.cpp
  2. 4
      Marlin/planner.cpp
  3. 2
      Marlin/planner.h

6
Marlin/Marlin_main.cpp

@ -5089,6 +5089,10 @@ inline void gcode_M104() {
if (code_value_temp_abs() > thermalManager.degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING); if (code_value_temp_abs() > thermalManager.degHotend(target_extruder)) LCD_MESSAGEPGM(MSG_HEATING);
} }
#if ENABLED(AUTOTEMP)
planner.autotemp_M104_M109();
#endif
} }
#if HAS_TEMP_HOTEND || HAS_TEMP_BED #if HAS_TEMP_HOTEND || HAS_TEMP_BED
@ -5284,7 +5288,7 @@ inline void gcode_M109() {
} }
#if ENABLED(AUTOTEMP) #if ENABLED(AUTOTEMP)
planner.autotemp_M109(); planner.autotemp_M104_M109();
#endif #endif
#if TEMP_RESIDENCY_TIME > 0 #if TEMP_RESIDENCY_TIME > 0

4
Marlin/planner.cpp

@ -1361,7 +1361,7 @@ void Planner::refresh_positioning() {
#if ENABLED(AUTOTEMP) #if ENABLED(AUTOTEMP)
void Planner::autotemp_M109() { void Planner::autotemp_M104_M109() {
autotemp_enabled = code_seen('F'); autotemp_enabled = code_seen('F');
if (autotemp_enabled) autotemp_factor = code_value_temp_diff(); if (autotemp_enabled) autotemp_factor = code_value_temp_diff();
if (code_seen('S')) autotemp_min = code_value_temp_abs(); if (code_seen('S')) autotemp_min = code_value_temp_abs();
@ -1379,4 +1379,4 @@ void Planner::refresh_positioning() {
SERIAL_EOL; SERIAL_EOL;
} }
#endif #endif

2
Marlin/planner.h

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

Loading…
Cancel
Save