Move M203-M205 to cpp
This commit is contained in:
45
Marlin/src/gcode/config/M205.cpp
Normal file
45
Marlin/src/gcode/config/M205.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
* Based on Sprinter and grbl.
|
||||
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/planner.h"
|
||||
|
||||
/**
|
||||
* M205: Set Advanced Settings
|
||||
*
|
||||
* S = Min Feed Rate (units/s)
|
||||
* T = Min Travel Feed Rate (units/s)
|
||||
* B = Min Segment Time (µs)
|
||||
* X = Max X Jerk (units/sec^2)
|
||||
* Y = Max Y Jerk (units/sec^2)
|
||||
* Z = Max Z Jerk (units/sec^2)
|
||||
* E = Max E Jerk (units/sec^2)
|
||||
*/
|
||||
void GcodeSuite::M205() {
|
||||
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('B')) planner.min_segment_time = parser.value_millis();
|
||||
if (parser.seen('X')) planner.max_jerk[X_AXIS] = parser.value_linear_units();
|
||||
if (parser.seen('Y')) planner.max_jerk[Y_AXIS] = parser.value_linear_units();
|
||||
if (parser.seen('Z')) planner.max_jerk[Z_AXIS] = parser.value_linear_units();
|
||||
if (parser.seen('E')) planner.max_jerk[E_AXIS] = parser.value_linear_units();
|
||||
}
|
||||
Reference in New Issue
Block a user