Move M203-M205 to cpp
This commit is contained in:
parent
b3822b9242
commit
7aca9fe2f7
|
@ -355,10 +355,6 @@ bool pin_is_protected(const int8_t pin) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "gcode/config/M203.h"
|
|
||||||
#include "gcode/config/M204.h"
|
|
||||||
#include "gcode/config/M205.h"
|
|
||||||
|
|
||||||
#if HAS_M206_COMMAND
|
#if HAS_M206_COMMAND
|
||||||
#include "gcode/geometry/M206.h"
|
#include "gcode/geometry/M206.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,12 +20,15 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../gcode.h"
|
||||||
|
#include "../../module/planner.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M203: Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in units/sec
|
* M203: Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in units/sec
|
||||||
*
|
*
|
||||||
* With multiple extruders use T to specify which one.
|
* With multiple extruders use T to specify which one.
|
||||||
*/
|
*/
|
||||||
void gcode_M203() {
|
void GcodeSuite::M203() {
|
||||||
|
|
||||||
GET_TARGET_EXTRUDER();
|
GET_TARGET_EXTRUDER();
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../gcode.h"
|
||||||
|
#include "../../module/planner.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M204: Set Accelerations in units/sec^2 (M204 P1200 R3000 T3000)
|
* M204: Set Accelerations in units/sec^2 (M204 P1200 R3000 T3000)
|
||||||
*
|
*
|
||||||
|
@ -29,7 +32,7 @@
|
||||||
*
|
*
|
||||||
* Also sets minimum segment time in ms (B20000) to prevent buffer under-runs and M20 minimum feedrate
|
* Also sets minimum segment time in ms (B20000) to prevent buffer under-runs and M20 minimum feedrate
|
||||||
*/
|
*/
|
||||||
void gcode_M204() {
|
void GcodeSuite::M204() {
|
||||||
if (parser.seen('S')) { // Kept for legacy compatibility. Should NOT BE USED for new developments.
|
if (parser.seen('S')) { // Kept for legacy compatibility. Should NOT BE USED for new developments.
|
||||||
planner.travel_acceleration = planner.acceleration = parser.value_linear_units();
|
planner.travel_acceleration = planner.acceleration = parser.value_linear_units();
|
||||||
SERIAL_ECHOLNPAIR("Setting Print and Travel Acceleration: ", planner.acceleration);
|
SERIAL_ECHOLNPAIR("Setting Print and Travel Acceleration: ", planner.acceleration);
|
|
@ -20,6 +20,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../gcode.h"
|
||||||
|
#include "../../module/planner.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* M205: Set Advanced Settings
|
* M205: Set Advanced Settings
|
||||||
*
|
*
|
||||||
|
@ -31,7 +34,7 @@
|
||||||
* Z = Max Z Jerk (units/sec^2)
|
* Z = Max Z Jerk (units/sec^2)
|
||||||
* E = Max E Jerk (units/sec^2)
|
* E = Max E Jerk (units/sec^2)
|
||||||
*/
|
*/
|
||||||
void gcode_M205() {
|
void GcodeSuite::M205() {
|
||||||
if (parser.seen('S')) planner.min_feedrate_mm_s = parser.value_linear_units();
|
if (parser.seen('S')) planner.min_feedrate_mm_s = parser.value_linear_units();
|
||||||
if (parser.seen('T')) planner.min_travel_feedrate_mm_s = parser.value_linear_units();
|
if (parser.seen('T')) planner.min_travel_feedrate_mm_s = parser.value_linear_units();
|
||||||
if (parser.seen('B')) planner.min_segment_time = parser.value_millis();
|
if (parser.seen('B')) planner.min_segment_time = parser.value_millis();
|
|
@ -119,9 +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_M203();
|
|
||||||
extern void gcode_M204();
|
|
||||||
extern void gcode_M205();
|
|
||||||
extern void gcode_M206();
|
extern void gcode_M206();
|
||||||
extern void gcode_M211();
|
extern void gcode_M211();
|
||||||
extern void gcode_M220();
|
extern void gcode_M220();
|
||||||
|
@ -536,15 +533,9 @@ void GcodeSuite::process_next_command() {
|
||||||
case 202: M202(); break; // Not used for Sprinter/grbl gen6
|
case 202: M202(); break; // Not used for Sprinter/grbl gen6
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case 203: // M203: Set max feedrate (units/sec)
|
case 203: M203(); break; // M203: Set max feedrate (units/sec)
|
||||||
gcode_M203();
|
case 204: M204(); break; // M204: Set acceleration
|
||||||
break;
|
case 205: M205(); break; // M205: Set advanced settings
|
||||||
case 204: // M204: Set acceleration
|
|
||||||
gcode_M204();
|
|
||||||
break;
|
|
||||||
case 205: // M205: Set advanced settings
|
|
||||||
gcode_M205();
|
|
||||||
break;
|
|
||||||
|
|
||||||
#if HAS_M206_COMMAND
|
#if HAS_M206_COMMAND
|
||||||
case 206: // M206: Set home offsets
|
case 206: // M206: Set home offsets
|
||||||
|
|
Loading…
Reference in a new issue