Move M665 to cpp

2.0.x
Scott Lahteine 7 years ago
parent 33861d4e04
commit f5877aa93e

@ -355,10 +355,6 @@ bool pin_is_protected(const int8_t pin) {
return false; return false;
} }
#if IS_KINEMATIC
#include "gcode/calibrate/M665.h"
#endif
#if ENABLED(DELTA) || ENABLED(Z_DUAL_ENDSTOPS) #if ENABLED(DELTA) || ENABLED(Z_DUAL_ENDSTOPS)
#include "gcode/calibrate/M666.h" #include "gcode/calibrate/M666.h"
#endif #endif

@ -20,8 +20,17 @@
* *
*/ */
#include "../../inc/MarlinConfig.h"
#if IS_KINEMATIC
#include "../gcode.h"
#include "../../module/motion.h"
#if ENABLED(DELTA) #if ENABLED(DELTA)
#include "../../module/delta.h"
/** /**
* M665: Set delta configurations * M665: Set delta configurations
* *
@ -34,7 +43,7 @@
* Y = Beta (Tower 2) angle trim * Y = Beta (Tower 2) angle trim
* Z = Rotate A and B by this angle * Z = Rotate A and B by this angle
*/ */
void gcode_M665() { void GcodeSuite::M665() {
if (parser.seen('H')) { if (parser.seen('H')) {
home_offset[Z_AXIS] = parser.value_linear_units() - DELTA_HEIGHT; home_offset[Z_AXIS] = parser.value_linear_units() - DELTA_HEIGHT;
update_software_endstops(Z_AXIS); update_software_endstops(Z_AXIS);
@ -54,6 +63,8 @@
#elif IS_SCARA #elif IS_SCARA
#include "../../module/scara.h"
/** /**
* M665: Set SCARA settings * M665: Set SCARA settings
* *
@ -66,7 +77,7 @@
* A, P, and X are all aliases for the shoulder angle * A, P, and X are all aliases for the shoulder angle
* B, T, and Y are all aliases for the elbow angle * B, T, and Y are all aliases for the elbow angle
*/ */
void gcode_M665() { void GcodeSuite::M665() {
if (parser.seen('S')) delta_segments_per_second = parser.value_float(); if (parser.seen('S')) delta_segments_per_second = parser.value_float();
const bool hasA = parser.seen('A'), hasP = parser.seen('P'), hasX = parser.seen('X'); const bool hasA = parser.seen('A'), hasP = parser.seen('P'), hasX = parser.seen('X');
@ -91,3 +102,5 @@
} }
#endif #endif
#endif // IS_KINEMATIC

@ -151,7 +151,6 @@ extern void gcode_M502();
extern void gcode_M503(); extern void gcode_M503();
extern void gcode_M540(); extern void gcode_M540();
extern void gcode_M605(); extern void gcode_M605();
extern void gcode_M665();
extern void gcode_M666(); extern void gcode_M666();
extern void gcode_M702(); extern void gcode_M702();
extern void gcode_M900(); extern void gcode_M900();
@ -541,9 +540,7 @@ void GcodeSuite::process_next_command() {
#endif #endif
#if ENABLED(DELTA) #if ENABLED(DELTA)
case 665: // M665: Set delta configurations case 665: M665(); break; // M665: Set delta configurations
gcode_M665();
break;
#endif #endif
#if ENABLED(DELTA) || ENABLED(Z_DUAL_ENDSTOPS) #if ENABLED(DELTA) || ENABLED(Z_DUAL_ENDSTOPS)

Loading…
Cancel
Save