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