Browse Source

Move M105 to cpp

Scott Lahteine 8 years ago
parent
commit
99c4b9050a
3 changed files with 6 additions and 6 deletions
  1. 0
    2
      Marlin/src/Marlin.cpp
  2. 1
    2
      Marlin/src/gcode/gcode.cpp
  3. 5
    2
      Marlin/src/gcode/temperature/M105.cpp

+ 0
- 2
Marlin/src/Marlin.cpp View File

@@ -374,8 +374,6 @@ bool pin_is_protected(const int8_t pin) {
374 374
   return false;
375 375
 }
376 376
 
377
-#include "gcode/temperature/M105.h"
378
-
379 377
 #if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED)
380 378
 
381 379
   static uint8_t auto_report_temp_interval;

+ 1
- 2
Marlin/src/gcode/gcode.cpp View File

@@ -124,7 +124,6 @@ extern void gcode_M83();
124 124
 extern void gcode_M85();
125 125
 extern void gcode_M92();
126 126
 extern void gcode_M100();
127
-extern void gcode_M105();
128 127
 extern void gcode_M106();
129 128
 extern void gcode_M107();
130 129
 extern void gcode_M108();
@@ -493,7 +492,7 @@ void GcodeSuite::process_next_command() {
493 492
 
494 493
 
495 494
       case 105: // M105: Report current temperature
496
-        gcode_M105();
495
+        M105();
497 496
         KEEPALIVE_STATE(NOT_BUSY);
498 497
         return; // "ok" already printed
499 498
 

Marlin/src/gcode/temperature/M105.h → Marlin/src/gcode/temperature/M105.cpp View File

@@ -20,11 +20,14 @@
20 20
  *
21 21
  */
22 22
 
23
+#include "../gcode.h"
24
+#include "../../module/temperature.h"
25
+
23 26
 /**
24 27
  * M105: Read hot end and bed temperature
25 28
  */
26
-void gcode_M105() {
27
-  if (gcode.get_target_extruder_from_command()) return;
29
+void GcodeSuite::M105() {
30
+  if (get_target_extruder_from_command()) return;
28 31
 
29 32
   #if HAS_TEMP_HOTEND || HAS_TEMP_BED
30 33
     SERIAL_PROTOCOLPGM(MSG_OK);

Loading…
Cancel
Save