Move G4 to cpp
This commit is contained in:
parent
4007cbfe9e
commit
760f29a88e
@ -365,8 +365,6 @@ void suicide() {
|
|||||||
***************** GCode Handlers *****************
|
***************** GCode Handlers *****************
|
||||||
**************************************************/
|
**************************************************/
|
||||||
|
|
||||||
#include "gcode/motion/G4.h"
|
|
||||||
|
|
||||||
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
||||||
#include "gcode/motion/G5.h"
|
#include "gcode/motion/G5.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -112,7 +112,6 @@ void GcodeSuite::dwell(millis_t time) {
|
|||||||
//
|
//
|
||||||
// Placeholders for non-migrated codes
|
// Placeholders for non-migrated codes
|
||||||
//
|
//
|
||||||
extern void gcode_G4();
|
|
||||||
extern void gcode_G5();
|
extern void gcode_G5();
|
||||||
extern void gcode_G12();
|
extern void gcode_G12();
|
||||||
extern void gcode_G17();
|
extern void gcode_G17();
|
||||||
@ -295,7 +294,7 @@ void GcodeSuite::process_next_command() {
|
|||||||
|
|
||||||
// G4 Dwell
|
// G4 Dwell
|
||||||
case 4:
|
case 4:
|
||||||
gcode_G4();
|
G4();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
#if ENABLED(BEZIER_CURVE_SUPPORT)
|
||||||
|
@ -299,7 +299,7 @@ public:
|
|||||||
#define KEEPALIVE_STATE(n) NOOP
|
#define KEEPALIVE_STATE(n) NOOP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void dwell(millis_t time);
|
static void dwell(millis_t time);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
@ -20,10 +20,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../gcode.h"
|
||||||
|
#include "../../module/stepper.h"
|
||||||
|
#include "../../lcd/ultralcd.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* G4: Dwell S<seconds> or P<milliseconds>
|
* G4: Dwell S<seconds> or P<milliseconds>
|
||||||
*/
|
*/
|
||||||
void gcode_G4() {
|
void GcodeSuite::G4() {
|
||||||
millis_t dwell_ms = 0;
|
millis_t dwell_ms = 0;
|
||||||
|
|
||||||
if (parser.seenval('P')) dwell_ms = parser.value_millis(); // milliseconds to wait
|
if (parser.seenval('P')) dwell_ms = parser.value_millis(); // milliseconds to wait
|
||||||
@ -33,5 +37,5 @@ void gcode_G4() {
|
|||||||
|
|
||||||
if (!lcd_hasstatus()) LCD_MESSAGEPGM(MSG_DWELL);
|
if (!lcd_hasstatus()) LCD_MESSAGEPGM(MSG_DWELL);
|
||||||
|
|
||||||
gcode.dwell(dwell_ms);
|
dwell(dwell_ms);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user