Move M18_M84, M85 to cpp
This commit is contained in:
parent
a911215b0e
commit
381b17e6a9
@ -170,8 +170,8 @@ volatile bool wait_for_heatup = true;
|
||||
#endif
|
||||
|
||||
// Inactivity shutdown
|
||||
static millis_t max_inactive_time = 0;
|
||||
static millis_t stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL;
|
||||
millis_t max_inactive_time = 0,
|
||||
stepper_inactive_time = (DEFAULT_STEPPER_DEACTIVE_TIME) * 1000UL;
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
float z_endstop_adj;
|
||||
@ -359,10 +359,6 @@ bool pin_is_protected(const int8_t pin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#include "gcode/control/M18_M84.h"
|
||||
|
||||
#include "gcode/control/M85.h"
|
||||
|
||||
#include "gcode/config/M92.h"
|
||||
|
||||
#if ENABLED(M100_FREE_MEMORY_WATCHER)
|
||||
|
@ -185,6 +185,9 @@ extern volatile bool wait_for_heatup;
|
||||
linear_fit* lsf_linear_fit(double x[], double y[], double z[], const int);
|
||||
#endif
|
||||
|
||||
// Inactivity shutdown timer
|
||||
extern millis_t max_inactive_time, stepper_inactive_time;
|
||||
|
||||
#if ENABLED(Z_DUAL_ENDSTOPS)
|
||||
extern float z_endstop_adj;
|
||||
#endif
|
||||
|
@ -20,14 +20,19 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../Marlin.h" // for stepper_inactive_time
|
||||
#include "../../module/stepper.h"
|
||||
|
||||
#if ENABLED(AUTO_BED_LEVELING_UBL) && ENABLED(ULTRA_LCD)
|
||||
extern bool defer_return_to_status;
|
||||
#include "../../feature/bedlevel/bedlevel.h"
|
||||
#include "../../lcd/ultralcd.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* M18, M84: Disable stepper motors
|
||||
*/
|
||||
void gcode_M18_M84() {
|
||||
void GcodeSuite::M18_M84() {
|
||||
if (parser.seenval('S')) {
|
||||
stepper_inactive_time = parser.value_millis_from_seconds();
|
||||
}
|
@ -20,12 +20,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../Marlin.h" // for max_inactive_time
|
||||
|
||||
/**
|
||||
* M85: Set inactivity shutdown timer with parameter S<seconds>. To disable set zero (default)
|
||||
*/
|
||||
void gcode_M85() {
|
||||
void GcodeSuite::M85() {
|
||||
|
||||
if (parser.seen('S')) max_inactive_time = parser.value_millis_from_seconds();
|
||||
|
||||
}
|
||||
|
@ -116,8 +116,6 @@ void GcodeSuite::dwell(millis_t time) {
|
||||
//
|
||||
// Placeholders for non-migrated codes
|
||||
//
|
||||
extern void gcode_M18_M84();
|
||||
extern void gcode_M85();
|
||||
extern void gcode_M92();
|
||||
extern void gcode_M100();
|
||||
extern void gcode_M114();
|
||||
@ -497,12 +495,9 @@ void GcodeSuite::process_next_command() {
|
||||
case 83: M83(); break; // M83: Set E axis relative mode
|
||||
|
||||
case 18: // M18 => M84
|
||||
case 84: // M84: Disable all steppers or set timeout
|
||||
gcode_M18_M84();
|
||||
break;
|
||||
case 85: // M85: Set inactivity stepper shutdown timeout
|
||||
gcode_M85();
|
||||
break;
|
||||
case 84: M18_M84(); break; // M84: Disable all steppers or set timeout
|
||||
case 85: M85(); break; // M85: Set inactivity stepper shutdown timeout
|
||||
|
||||
case 92: // M92: Set the steps-per-unit for one or more axes
|
||||
gcode_M92();
|
||||
break;
|
||||
|
@ -80,6 +80,8 @@
|
||||
|
||||
#if ENABLED(ULTIPANEL)
|
||||
|
||||
extern bool defer_return_to_status;
|
||||
|
||||
// Function pointer to menu functions.
|
||||
typedef void (*screenFunc_t)();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user