Move M226 to cpp
This commit is contained in:
parent
0e319104c2
commit
3e761696a0
@ -355,8 +355,6 @@ bool pin_is_protected(const int8_t pin) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "gcode/control/M226.h"
|
|
||||||
|
|
||||||
#if ENABLED(EXPERIMENTAL_I2CBUS)
|
#if ENABLED(EXPERIMENTAL_I2CBUS)
|
||||||
#include "gcode/feature/i2c/M260_M261.h"
|
#include "gcode/feature/i2c/M260_M261.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,10 +20,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../gcode.h"
|
||||||
|
#include "../../Marlin.h" // for pin_is_protected and idle()
|
||||||
|
#include "../../module/stepper.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M226: Wait until the specified pin reaches the state required (M226 P<pin> S<state>)
|
* M226: Wait until the specified pin reaches the state required (M226 P<pin> S<state>)
|
||||||
*/
|
*/
|
||||||
void gcode_M226() {
|
void GcodeSuite::M226() {
|
||||||
if (parser.seen('P')) {
|
if (parser.seen('P')) {
|
||||||
const int pin_number = parser.value_int(),
|
const int pin_number = parser.value_int(),
|
||||||
pin_state = parser.intval('S', -1); // required pin state - default is inverted
|
pin_state = parser.intval('S', -1); // required pin state - default is inverted
|
@ -119,7 +119,6 @@ void GcodeSuite::dwell(millis_t time) {
|
|||||||
extern void gcode_M163();
|
extern void gcode_M163();
|
||||||
extern void gcode_M164();
|
extern void gcode_M164();
|
||||||
extern void gcode_M165();
|
extern void gcode_M165();
|
||||||
extern void gcode_M226();
|
|
||||||
extern void gcode_M240();
|
extern void gcode_M240();
|
||||||
extern void gcode_M250();
|
extern void gcode_M250();
|
||||||
extern void gcode_M260();
|
extern void gcode_M260();
|
||||||
@ -564,9 +563,7 @@ void GcodeSuite::process_next_command() {
|
|||||||
M221();
|
M221();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 226: // M226: Wait until a pin reaches a state
|
case 226: M226(); break; // M226: Wait until a pin reaches a state
|
||||||
gcode_M226();
|
|
||||||
break;
|
|
||||||
|
|
||||||
#if HAS_SERVOS
|
#if HAS_SERVOS
|
||||||
case 280: // M280: Set servo position absolute
|
case 280: // M280: Set servo position absolute
|
||||||
|
Loading…
Reference in New Issue
Block a user