Add gcode.cpp, motion.*, queue.* - Apply to some G-codes.
This commit is contained in:
@ -20,15 +20,18 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../Marlin.h"
|
||||
|
||||
/**
|
||||
* M200: Set filament diameter and set E axis units to cubic units
|
||||
*
|
||||
* T<extruder> - Optional extruder number. Current extruder if omitted.
|
||||
* D<linear> - Diameter of the filament. Use "D0" to switch back to linear units on the E axis.
|
||||
*/
|
||||
void gcode_M200() {
|
||||
void GcodeSuite::M200() {
|
||||
|
||||
if (get_target_extruder_from_command(200)) return;
|
||||
if (get_target_extruder_from_command()) return;
|
||||
|
||||
if (parser.seen('D')) {
|
||||
// setting any extruder filament size disables volumetric on the assumption that
|
@ -27,7 +27,7 @@
|
||||
*/
|
||||
void gcode_M201() {
|
||||
|
||||
GET_TARGET_EXTRUDER(201);
|
||||
GET_TARGET_EXTRUDER();
|
||||
|
||||
LOOP_XYZE(i) {
|
||||
if (parser.seen(axis_codes[i])) {
|
||||
|
@ -27,7 +27,7 @@
|
||||
*/
|
||||
void gcode_M203() {
|
||||
|
||||
GET_TARGET_EXTRUDER(203);
|
||||
GET_TARGET_EXTRUDER();
|
||||
|
||||
LOOP_XYZE(i)
|
||||
if (parser.seen(axis_codes[i])) {
|
||||
|
@ -20,6 +20,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
|
||||
#if HOTENDS > 1
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/motion.h"
|
||||
|
||||
/**
|
||||
* M218 - set hotend offset (in linear units)
|
||||
*
|
||||
@ -28,8 +35,8 @@
|
||||
* Y<yoffset>
|
||||
* Z<zoffset> - Available with DUAL_X_CARRIAGE and SWITCHING_NOZZLE
|
||||
*/
|
||||
void gcode_M218() {
|
||||
if (get_target_extruder_from_command(218) || target_extruder == 0) return;
|
||||
void GcodeSuite::M218() {
|
||||
if (get_target_extruder_from_command() || target_extruder == 0) return;
|
||||
|
||||
if (parser.seenval('X')) hotend_offset[X_AXIS][target_extruder] = parser.value_linear_units();
|
||||
if (parser.seenval('Y')) hotend_offset[Y_AXIS][target_extruder] = parser.value_linear_units();
|
||||
@ -52,3 +59,5 @@ void gcode_M218() {
|
||||
}
|
||||
SERIAL_EOL();
|
||||
}
|
||||
|
||||
#endif // HOTENDS > 1
|
@ -20,11 +20,14 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../Marlin.h"
|
||||
|
||||
/**
|
||||
* M221: Set extrusion percentage (M221 T0 S95)
|
||||
*/
|
||||
void gcode_M221() {
|
||||
if (get_target_extruder_from_command(221)) return;
|
||||
void GcodeSuite::M221() {
|
||||
if (get_target_extruder_from_command()) return;
|
||||
if (parser.seenval('S'))
|
||||
flow_percentage[target_extruder] = parser.value_int();
|
||||
}
|
@ -20,6 +20,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../gcode.h"
|
||||
|
||||
#include "../../pins/pinsDebug.h"
|
||||
|
||||
inline void toggle_pins() {
|
||||
@ -141,7 +143,7 @@ inline void servo_probe_test() {
|
||||
}
|
||||
if (probe_inverting != deploy_state) SERIAL_PROTOCOLLNPGM("WARNING - INVERTING setting probably backwards");
|
||||
|
||||
refresh_cmd_timeout();
|
||||
gcode.refresh_cmd_timeout();
|
||||
|
||||
if (deploy_state != stow_state) {
|
||||
SERIAL_PROTOCOLLNPGM("BLTouch clone detected");
|
||||
@ -170,7 +172,7 @@ inline void servo_probe_test() {
|
||||
safe_delay(2);
|
||||
|
||||
if (0 == j % (500 * 1)) // keep cmd_timeout happy
|
||||
refresh_cmd_timeout();
|
||||
gcode.refresh_cmd_timeout();
|
||||
|
||||
if (deploy_state != READ(PROBE_TEST_PIN)) { // probe triggered
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
*/
|
||||
void gcode_M92() {
|
||||
|
||||
GET_TARGET_EXTRUDER(92);
|
||||
GET_TARGET_EXTRUDER();
|
||||
|
||||
LOOP_XYZE(i) {
|
||||
if (parser.seen(axis_codes[i])) {
|
||||
|
Reference in New Issue
Block a user