Move M226 to cpp
This commit is contained in:
parent
0e319104c2
commit
3e761696a0
3 changed files with 6 additions and 7 deletions
|
@ -355,8 +355,6 @@ bool pin_is_protected(const int8_t pin) {
|
|||
return false;
|
||||
}
|
||||
|
||||
#include "gcode/control/M226.h"
|
||||
|
||||
#if ENABLED(EXPERIMENTAL_I2CBUS)
|
||||
#include "gcode/feature/i2c/M260_M261.h"
|
||||
#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>)
|
||||
*/
|
||||
void gcode_M226() {
|
||||
void GcodeSuite::M226() {
|
||||
if (parser.seen('P')) {
|
||||
const int pin_number = parser.value_int(),
|
||||
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_M164();
|
||||
extern void gcode_M165();
|
||||
extern void gcode_M226();
|
||||
extern void gcode_M240();
|
||||
extern void gcode_M250();
|
||||
extern void gcode_M260();
|
||||
|
@ -564,9 +563,7 @@ void GcodeSuite::process_next_command() {
|
|||
M221();
|
||||
break;
|
||||
|
||||
case 226: // M226: Wait until a pin reaches a state
|
||||
gcode_M226();
|
||||
break;
|
||||
case 226: M226(); break; // M226: Wait until a pin reaches a state
|
||||
|
||||
#if HAS_SERVOS
|
||||
case 280: // M280: Set servo position absolute
|
||||
|
|
Reference in a new issue