Bladeren bron

Move M31 to cpp

Scott Lahteine 7 jaren geleden
bovenliggende
commit
69b664b6fe
3 gewijzigde bestanden met toevoegingen van 8 en 6 verwijderingen
  1. 0
    2
      Marlin/src/Marlin.cpp
  2. 1
    3
      Marlin/src/gcode/gcode.cpp
  3. 7
    1
      Marlin/src/gcode/stats/M31.cpp

+ 0
- 2
Marlin/src/Marlin.cpp Bestand weergeven

@@ -360,8 +360,6 @@ void suicide() {
360 360
  ***************** GCode Handlers *****************
361 361
  **************************************************/
362 362
 
363
-#include "gcode/stats/M31.h"              // M31: Get the time since the start of SD Print (or last M109)
364
-
365 363
 /**
366 364
  * Sensitive pin test for M42, M226
367 365
  */

+ 1
- 3
Marlin/src/gcode/gcode.cpp Bestand weergeven

@@ -117,7 +117,6 @@ void GcodeSuite::dwell(millis_t time) {
117 117
 // Placeholders for non-migrated codes
118 118
 //
119 119
 extern void gcode_M18_M84();
120
-extern void gcode_M31();
121 120
 extern void gcode_M42();
122 121
 extern void gcode_M43();
123 122
 extern void gcode_M48();
@@ -432,8 +431,7 @@ void GcodeSuite::process_next_command() {
432 431
         case 928: M928(); break;  // M928: Start SD write
433 432
       #endif // SDSUPPORT
434 433
 
435
-      case 31: // M31: Report time since the start of SD print or last M109
436
-        gcode_M31(); break;
434
+      case 31: M31(); break;      // M31: Report time since the start of SD print or last M109
437 435
 
438 436
       case 42: // M42: Change pin state
439 437
         gcode_M42(); break;

Marlin/src/gcode/stats/M31.h → Marlin/src/gcode/stats/M31.cpp Bestand weergeven

@@ -20,10 +20,16 @@
20 20
  *
21 21
  */
22 22
 
23
+#include "../gcode.h"
24
+#include "../../core/serial.h"
25
+#include "../../module/printcounter.h"
26
+#include "../../libs/duration_t.h"
27
+#include "../../lcd/ultralcd.h"
28
+
23 29
 /**
24 30
  * M31: Get the time since the start of SD Print (or last M109)
25 31
  */
26
-void gcode_M31() {
32
+void GcodeSuite::M31() {
27 33
   char buffer[21];
28 34
   duration_t elapsed = print_job_timer.duration();
29 35
   elapsed.toString(buffer);

Laden…
Annuleren
Opslaan