Move M119-M121 to cpp
This commit is contained in:
parent
379f16558e
commit
eef4a54778
@ -355,10 +355,6 @@ bool pin_is_protected(const int8_t pin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#include "gcode/host/M119.h"
|
||||
|
||||
#include "gcode/control/M120_M121.h"
|
||||
|
||||
#if HAS_COLOR_LEDS
|
||||
#include "gcode/feature/leds/M150.h"
|
||||
#endif
|
||||
|
@ -20,20 +20,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
/**
|
||||
* M120: Enable endstops and set non-homing endstop state to "enabled"
|
||||
*/
|
||||
void gcode_M120() {
|
||||
|
||||
endstops.enable_globally(true);
|
||||
|
||||
}
|
||||
void GcodeSuite::M120() { endstops.enable_globally(true); }
|
||||
|
||||
/**
|
||||
* M121: Disable endstops and set non-homing endstop state to "disabled"
|
||||
*/
|
||||
void gcode_M121() {
|
||||
|
||||
endstops.enable_globally(false);
|
||||
|
||||
}
|
||||
void GcodeSuite::M121() { endstops.enable_globally(false); }
|
@ -116,9 +116,6 @@ void GcodeSuite::dwell(millis_t time) {
|
||||
//
|
||||
// Placeholders for non-migrated codes
|
||||
//
|
||||
extern void gcode_M119();
|
||||
extern void gcode_M120();
|
||||
extern void gcode_M121();
|
||||
extern void gcode_M150();
|
||||
extern void gcode_M163();
|
||||
extern void gcode_M164();
|
||||
@ -499,15 +496,9 @@ void GcodeSuite::process_next_command() {
|
||||
case 117: M117(); break; // M117: Set LCD message text, if possible
|
||||
case 118: M118(); break; // M118: Display a message in the host console
|
||||
|
||||
case 119: // M119: Report endstop states
|
||||
gcode_M119();
|
||||
break;
|
||||
case 120: // M120: Enable endstops
|
||||
gcode_M120();
|
||||
break;
|
||||
case 121: // M121: Disable endstops
|
||||
gcode_M121();
|
||||
break;
|
||||
case 119: M119(); break; // M119: Report endstop states
|
||||
case 120: M120(); break; // M120: Enable endstops
|
||||
case 121: M121(); break; // M121: Disable endstops
|
||||
|
||||
#if ENABLED(ULTIPANEL)
|
||||
case 145: M145(); break; // M145: Set material heatup parameters
|
||||
|
@ -20,7 +20,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/endstops.h"
|
||||
|
||||
/**
|
||||
* M119: Output endstop states to serial output
|
||||
*/
|
||||
void gcode_M119() { endstops.M119(); }
|
||||
void GcodeSuite::M119() {
|
||||
|
||||
endstops.M119();
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user