|
|
@ -2107,7 +2107,7 @@ static void clean_up_after_endstop_or_probe_move() {
|
|
|
|
do_blocking_move_to_xy(x - (X_PROBE_OFFSET_FROM_EXTRUDER), y - (Y_PROBE_OFFSET_FROM_EXTRUDER));
|
|
|
|
do_blocking_move_to_xy(x - (X_PROBE_OFFSET_FROM_EXTRUDER), y - (Y_PROBE_OFFSET_FROM_EXTRUDER));
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOLNPGM("> deploy_z_probe");
|
|
|
|
if (DEBUGGING(LEVELING)) SERIAL_ECHOPGM("> ");
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
deploy_z_probe();
|
|
|
|
deploy_z_probe();
|
|
|
|
|
|
|
|
|
|
|
@ -2543,7 +2543,7 @@ void unknown_command_error() {
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHOPGM(MSG_UNKNOWN_COMMAND);
|
|
|
|
SERIAL_ECHOPGM(MSG_UNKNOWN_COMMAND);
|
|
|
|
SERIAL_ECHO(current_command);
|
|
|
|
SERIAL_ECHO(current_command);
|
|
|
|
SERIAL_ECHOPGM("\"\n");
|
|
|
|
SERIAL_ECHOLNPGM("\"");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(HOST_KEEPALIVE_FEATURE)
|
|
|
|
#if ENABLED(HOST_KEEPALIVE_FEATURE)
|
|
|
@ -3187,19 +3187,11 @@ inline void gcode_G28() {
|
|
|
|
switch (state) {
|
|
|
|
switch (state) {
|
|
|
|
case MeshReport:
|
|
|
|
case MeshReport:
|
|
|
|
if (mbl.has_mesh()) {
|
|
|
|
if (mbl.has_mesh()) {
|
|
|
|
SERIAL_PROTOCOLPGM("State: ");
|
|
|
|
SERIAL_PROTOCOLPAIR("State: ", mbl.active() ? "On" : "Off");
|
|
|
|
if (mbl.active())
|
|
|
|
SERIAL_PROTOCOLPAIR("\nNum X,Y: ", MESH_NUM_X_POINTS);
|
|
|
|
SERIAL_PROTOCOLPGM("On");
|
|
|
|
SERIAL_PROTOCOLCHAR(','); SERIAL_PROTOCOL(MESH_NUM_Y_POINTS);
|
|
|
|
else
|
|
|
|
SERIAL_PROTOCOLPAIR("\nZ search height: ", MESH_HOME_SEARCH_Z);
|
|
|
|
SERIAL_PROTOCOLPGM("Off");
|
|
|
|
SERIAL_PROTOCOLPGM("\nZ offset: "); SERIAL_PROTOCOL_F(mbl.z_offset, 5);
|
|
|
|
SERIAL_PROTOCOLPGM("\nNum X,Y: ");
|
|
|
|
|
|
|
|
SERIAL_PROTOCOL(MESH_NUM_X_POINTS);
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLCHAR(',');
|
|
|
|
|
|
|
|
SERIAL_PROTOCOL(MESH_NUM_Y_POINTS);
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLPGM("\nZ search height: ");
|
|
|
|
|
|
|
|
SERIAL_PROTOCOL(MESH_HOME_SEARCH_Z);
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLPGM("\nZ offset: ");
|
|
|
|
|
|
|
|
SERIAL_PROTOCOL_F(mbl.z_offset, 5);
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLLNPGM("\nMeasured points:");
|
|
|
|
SERIAL_PROTOCOLLNPGM("\nMeasured points:");
|
|
|
|
for (py = 0; py < MESH_NUM_Y_POINTS; py++) {
|
|
|
|
for (py = 0; py < MESH_NUM_Y_POINTS; py++) {
|
|
|
|
for (px = 0; px < MESH_NUM_X_POINTS; px++) {
|
|
|
|
for (px = 0; px < MESH_NUM_X_POINTS; px++) {
|
|
|
@ -3268,30 +3260,30 @@ inline void gcode_G28() {
|
|
|
|
if (code_seen('X')) {
|
|
|
|
if (code_seen('X')) {
|
|
|
|
px = code_value_int() - 1;
|
|
|
|
px = code_value_int() - 1;
|
|
|
|
if (px < 0 || px >= MESH_NUM_X_POINTS) {
|
|
|
|
if (px < 0 || px >= MESH_NUM_X_POINTS) {
|
|
|
|
SERIAL_PROTOCOLPGM("X out of range (1-" STRINGIFY(MESH_NUM_X_POINTS) ").\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("X out of range (1-" STRINGIFY(MESH_NUM_X_POINTS) ").");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
SERIAL_PROTOCOLPGM("X not entered.\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("X not entered.");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (code_seen('Y')) {
|
|
|
|
if (code_seen('Y')) {
|
|
|
|
py = code_value_int() - 1;
|
|
|
|
py = code_value_int() - 1;
|
|
|
|
if (py < 0 || py >= MESH_NUM_Y_POINTS) {
|
|
|
|
if (py < 0 || py >= MESH_NUM_Y_POINTS) {
|
|
|
|
SERIAL_PROTOCOLPGM("Y out of range (1-" STRINGIFY(MESH_NUM_Y_POINTS) ").\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("Y out of range (1-" STRINGIFY(MESH_NUM_Y_POINTS) ").");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
SERIAL_PROTOCOLPGM("Y not entered.\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("Y not entered.");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (code_seen('Z')) {
|
|
|
|
if (code_seen('Z')) {
|
|
|
|
z = code_value_axis_units(Z_AXIS);
|
|
|
|
z = code_value_axis_units(Z_AXIS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
SERIAL_PROTOCOLPGM("Z not entered.\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("Z not entered.");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mbl.z_values[py][px] = z;
|
|
|
|
mbl.z_values[py][px] = z;
|
|
|
@ -3302,7 +3294,7 @@ inline void gcode_G28() {
|
|
|
|
z = code_value_axis_units(Z_AXIS);
|
|
|
|
z = code_value_axis_units(Z_AXIS);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
SERIAL_PROTOCOLPGM("Z not entered.\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("Z not entered.");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mbl.z_offset = z;
|
|
|
|
mbl.z_offset = z;
|
|
|
@ -3397,8 +3389,8 @@ inline void gcode_G28() {
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
if (verbose_level > 0) {
|
|
|
|
if (verbose_level > 0) {
|
|
|
|
SERIAL_PROTOCOLPGM("G29 Auto Bed Leveling\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("G29 Auto Bed Leveling");
|
|
|
|
if (dryrun) SERIAL_ECHOLNPGM("Running in DRY-RUN mode");
|
|
|
|
if (dryrun) SERIAL_PROTOCOLLNPGM("Running in DRY-RUN mode");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int auto_bed_leveling_grid_points = AUTO_BED_LEVELING_GRID_POINTS;
|
|
|
|
int auto_bed_leveling_grid_points = AUTO_BED_LEVELING_GRID_POINTS;
|
|
|
@ -3406,7 +3398,7 @@ inline void gcode_G28() {
|
|
|
|
#if DISABLED(DELTA)
|
|
|
|
#if DISABLED(DELTA)
|
|
|
|
if (code_seen('P')) auto_bed_leveling_grid_points = code_value_int();
|
|
|
|
if (code_seen('P')) auto_bed_leveling_grid_points = code_value_int();
|
|
|
|
if (auto_bed_leveling_grid_points < 2) {
|
|
|
|
if (auto_bed_leveling_grid_points < 2) {
|
|
|
|
SERIAL_PROTOCOLPGM("?Number of probed (P)oints is implausible (2 minimum).\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("?Number of probed (P)oints is implausible (2 minimum).");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -3637,17 +3629,17 @@ inline void gcode_G28() {
|
|
|
|
// Show the Topography map if enabled
|
|
|
|
// Show the Topography map if enabled
|
|
|
|
if (do_topography_map) {
|
|
|
|
if (do_topography_map) {
|
|
|
|
|
|
|
|
|
|
|
|
SERIAL_PROTOCOLPGM(" \nBed Height Topography: \n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("\nBed Height Topography:\n"
|
|
|
|
SERIAL_PROTOCOLPGM(" +--- BACK --+\n");
|
|
|
|
" +--- BACK --+\n"
|
|
|
|
SERIAL_PROTOCOLPGM(" | |\n");
|
|
|
|
" | |\n"
|
|
|
|
SERIAL_PROTOCOLPGM(" L | (+) | R\n");
|
|
|
|
" L | (+) | R\n"
|
|
|
|
SERIAL_PROTOCOLPGM(" E | | I\n");
|
|
|
|
" E | | I\n"
|
|
|
|
SERIAL_PROTOCOLPGM(" F | (-) N (+) | G\n");
|
|
|
|
" F | (-) N (+) | G\n"
|
|
|
|
SERIAL_PROTOCOLPGM(" T | | H\n");
|
|
|
|
" T | | H\n"
|
|
|
|
SERIAL_PROTOCOLPGM(" | (-) | T\n");
|
|
|
|
" | (-) | T\n"
|
|
|
|
SERIAL_PROTOCOLPGM(" | |\n");
|
|
|
|
" | |\n"
|
|
|
|
SERIAL_PROTOCOLPGM(" O-- FRONT --+\n");
|
|
|
|
" O-- FRONT --+\n"
|
|
|
|
SERIAL_PROTOCOLPGM(" (0,0)\n");
|
|
|
|
" (0,0)");
|
|
|
|
|
|
|
|
|
|
|
|
float min_diff = 999;
|
|
|
|
float min_diff = 999;
|
|
|
|
|
|
|
|
|
|
|
@ -3674,7 +3666,7 @@ inline void gcode_G28() {
|
|
|
|
} // yy
|
|
|
|
} // yy
|
|
|
|
SERIAL_EOL;
|
|
|
|
SERIAL_EOL;
|
|
|
|
if (verbose_level > 3) {
|
|
|
|
if (verbose_level > 3) {
|
|
|
|
SERIAL_PROTOCOLPGM(" \nCorrected Bed Height vs. Bed Topology: \n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("\nCorrected Bed Height vs. Bed Topology:");
|
|
|
|
|
|
|
|
|
|
|
|
for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) {
|
|
|
|
for (int yy = auto_bed_leveling_grid_points - 1; yy >= 0; yy--) {
|
|
|
|
for (int xx = 0; xx < auto_bed_leveling_grid_points; xx++) {
|
|
|
|
for (int xx = 0; xx < auto_bed_leveling_grid_points; xx++) {
|
|
|
@ -3747,7 +3739,7 @@ inline void gcode_G28() {
|
|
|
|
#ifdef Z_PROBE_END_SCRIPT
|
|
|
|
#ifdef Z_PROBE_END_SCRIPT
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
#if ENABLED(DEBUG_LEVELING_FEATURE)
|
|
|
|
if (DEBUGGING(LEVELING)) {
|
|
|
|
if (DEBUGGING(LEVELING)) {
|
|
|
|
SERIAL_ECHO("Z Probe End Script: ");
|
|
|
|
SERIAL_ECHOPGM("Z Probe End Script: ");
|
|
|
|
SERIAL_ECHOLNPGM(Z_PROBE_END_SCRIPT);
|
|
|
|
SERIAL_ECHOLNPGM(Z_PROBE_END_SCRIPT);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -4130,16 +4122,16 @@ inline void gcode_M42() {
|
|
|
|
|
|
|
|
|
|
|
|
int8_t verbose_level = code_seen('V') ? code_value_byte() : 1;
|
|
|
|
int8_t verbose_level = code_seen('V') ? code_value_byte() : 1;
|
|
|
|
if (verbose_level < 0 || verbose_level > 4) {
|
|
|
|
if (verbose_level < 0 || verbose_level > 4) {
|
|
|
|
SERIAL_PROTOCOLPGM("?Verbose Level not plausible (0-4).\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("?Verbose Level not plausible (0-4).");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (verbose_level > 0)
|
|
|
|
if (verbose_level > 0)
|
|
|
|
SERIAL_PROTOCOLPGM("M48 Z-Probe Repeatability test\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("M48 Z-Probe Repeatability test");
|
|
|
|
|
|
|
|
|
|
|
|
int8_t n_samples = code_seen('P') ? code_value_byte() : 10;
|
|
|
|
int8_t n_samples = code_seen('P') ? code_value_byte() : 10;
|
|
|
|
if (n_samples < 4 || n_samples > 50) {
|
|
|
|
if (n_samples < 4 || n_samples > 50) {
|
|
|
|
SERIAL_PROTOCOLPGM("?Sample size not plausible (4-50).\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("?Sample size not plausible (4-50).");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -4168,7 +4160,7 @@ inline void gcode_M42() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
if (sqrt(X_probe_location * X_probe_location + Y_probe_location * Y_probe_location) > DELTA_PROBEABLE_RADIUS) {
|
|
|
|
if (sqrt(X_probe_location * X_probe_location + Y_probe_location * Y_probe_location) > DELTA_PROBEABLE_RADIUS) {
|
|
|
|
SERIAL_PROTOCOLPGM("? (X,Y) location outside of probeable radius.\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("? (X,Y) location outside of probeable radius.");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -4176,7 +4168,7 @@ inline void gcode_M42() {
|
|
|
|
bool seen_L = code_seen('L');
|
|
|
|
bool seen_L = code_seen('L');
|
|
|
|
uint8_t n_legs = seen_L ? code_value_byte() : 0;
|
|
|
|
uint8_t n_legs = seen_L ? code_value_byte() : 0;
|
|
|
|
if (n_legs > 15) {
|
|
|
|
if (n_legs > 15) {
|
|
|
|
SERIAL_PROTOCOLPGM("?Number of legs in movement not plausible (0-15).\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("?Number of legs in movement not plausible (0-15).");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (n_legs == 1) n_legs = 2;
|
|
|
|
if (n_legs == 1) n_legs = 2;
|
|
|
@ -4190,7 +4182,7 @@ inline void gcode_M42() {
|
|
|
|
* we don't want to use that as a starting point for each probe.
|
|
|
|
* we don't want to use that as a starting point for each probe.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
if (verbose_level > 2)
|
|
|
|
if (verbose_level > 2)
|
|
|
|
SERIAL_PROTOCOLPGM("Positioning the probe...\n");
|
|
|
|
SERIAL_PROTOCOLLNPGM("Positioning the probe...");
|
|
|
|
|
|
|
|
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
#if ENABLED(DELTA)
|
|
|
|
// we don't do bed level correction in M48 because we want the raw data when we probe
|
|
|
|
// we don't do bed level correction in M48 because we want the raw data when we probe
|
|
|
@ -4223,9 +4215,9 @@ inline void gcode_M42() {
|
|
|
|
if (verbose_level > 3) {
|
|
|
|
if (verbose_level > 3) {
|
|
|
|
SERIAL_ECHOPAIR("Starting radius: ", radius);
|
|
|
|
SERIAL_ECHOPAIR("Starting radius: ", radius);
|
|
|
|
SERIAL_ECHOPAIR(" angle: ", angle);
|
|
|
|
SERIAL_ECHOPAIR(" angle: ", angle);
|
|
|
|
SERIAL_ECHO(" Direction: ");
|
|
|
|
SERIAL_ECHOPGM(" Direction: ");
|
|
|
|
if (dir > 0) SERIAL_ECHO("Counter ");
|
|
|
|
if (dir > 0) SERIAL_ECHOPGM("Counter-");
|
|
|
|
SERIAL_ECHOLN("Clockwise");
|
|
|
|
SERIAL_ECHOLNPGM("Clockwise");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (uint8_t l = 0; l < n_legs - 1; l++) {
|
|
|
|
for (uint8_t l = 0; l < n_legs - 1; l++) {
|
|
|
@ -4268,10 +4260,10 @@ inline void gcode_M42() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
if (verbose_level > 3) {
|
|
|
|
if (verbose_level > 3) {
|
|
|
|
SERIAL_PROTOCOL("Going to:");
|
|
|
|
SERIAL_PROTOCOLPGM("Going to:");
|
|
|
|
SERIAL_ECHOPAIR("x: ", X_current);
|
|
|
|
SERIAL_ECHOPAIR(" X", X_current);
|
|
|
|
SERIAL_ECHOPAIR("y: ", Y_current);
|
|
|
|
SERIAL_ECHOPAIR(" Y", Y_current);
|
|
|
|
SERIAL_ECHOPAIR(" z: ", current_position[Z_AXIS]);
|
|
|
|
SERIAL_ECHOPAIR(" Z", current_position[Z_AXIS]);
|
|
|
|
SERIAL_EOL;
|
|
|
|
SERIAL_EOL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
do_blocking_move_to_xy(X_current, Y_current);
|
|
|
|
do_blocking_move_to_xy(X_current, Y_current);
|
|
|
@ -5542,9 +5534,9 @@ inline void gcode_M226() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (servo_index >= 0) {
|
|
|
|
else if (servo_index >= 0) {
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHO(" Servo ");
|
|
|
|
SERIAL_ECHOPGM(" Servo ");
|
|
|
|
SERIAL_ECHO(servo_index);
|
|
|
|
SERIAL_ECHO(servo_index);
|
|
|
|
SERIAL_ECHO(": ");
|
|
|
|
SERIAL_ECHOPGM(": ");
|
|
|
|
SERIAL_ECHOLN(servo[servo_index].read());
|
|
|
|
SERIAL_ECHOLN(servo[servo_index].read());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -5601,17 +5593,17 @@ inline void gcode_M226() {
|
|
|
|
thermalManager.updatePID();
|
|
|
|
thermalManager.updatePID();
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
#if ENABLED(PID_PARAMS_PER_HOTEND)
|
|
|
|
#if ENABLED(PID_PARAMS_PER_HOTEND)
|
|
|
|
SERIAL_ECHO(" e:"); // specify extruder in serial output
|
|
|
|
SERIAL_ECHOPGM(" e:"); // specify extruder in serial output
|
|
|
|
SERIAL_ECHO(e);
|
|
|
|
SERIAL_ECHO(e);
|
|
|
|
#endif // PID_PARAMS_PER_HOTEND
|
|
|
|
#endif // PID_PARAMS_PER_HOTEND
|
|
|
|
SERIAL_ECHO(" p:");
|
|
|
|
SERIAL_ECHOPGM(" p:");
|
|
|
|
SERIAL_ECHO(PID_PARAM(Kp, e));
|
|
|
|
SERIAL_ECHO(PID_PARAM(Kp, e));
|
|
|
|
SERIAL_ECHO(" i:");
|
|
|
|
SERIAL_ECHOPGM(" i:");
|
|
|
|
SERIAL_ECHO(unscalePID_i(PID_PARAM(Ki, e)));
|
|
|
|
SERIAL_ECHO(unscalePID_i(PID_PARAM(Ki, e)));
|
|
|
|
SERIAL_ECHO(" d:");
|
|
|
|
SERIAL_ECHOPGM(" d:");
|
|
|
|
SERIAL_ECHO(unscalePID_d(PID_PARAM(Kd, e)));
|
|
|
|
SERIAL_ECHO(unscalePID_d(PID_PARAM(Kd, e)));
|
|
|
|
#if ENABLED(PID_ADD_EXTRUSION_RATE)
|
|
|
|
#if ENABLED(PID_ADD_EXTRUSION_RATE)
|
|
|
|
SERIAL_ECHO(" c:");
|
|
|
|
SERIAL_ECHOPGM(" c:");
|
|
|
|
//Kc does not have scaling applied above, or in resetting defaults
|
|
|
|
//Kc does not have scaling applied above, or in resetting defaults
|
|
|
|
SERIAL_ECHO(PID_PARAM(Kc, e));
|
|
|
|
SERIAL_ECHO(PID_PARAM(Kc, e));
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
@ -5635,11 +5627,11 @@ inline void gcode_M226() {
|
|
|
|
thermalManager.updatePID();
|
|
|
|
thermalManager.updatePID();
|
|
|
|
|
|
|
|
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHO(" p:");
|
|
|
|
SERIAL_ECHOPGM(" p:");
|
|
|
|
SERIAL_ECHO(thermalManager.bedKp);
|
|
|
|
SERIAL_ECHO(thermalManager.bedKp);
|
|
|
|
SERIAL_ECHO(" i:");
|
|
|
|
SERIAL_ECHOPGM(" i:");
|
|
|
|
SERIAL_ECHO(unscalePID_i(thermalManager.bedKi));
|
|
|
|
SERIAL_ECHO(unscalePID_i(thermalManager.bedKi));
|
|
|
|
SERIAL_ECHO(" d:");
|
|
|
|
SERIAL_ECHOPGM(" d:");
|
|
|
|
SERIAL_ECHOLN(unscalePID_d(thermalManager.bedKd));
|
|
|
|
SERIAL_ECHOLN(unscalePID_d(thermalManager.bedKd));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -5739,7 +5731,7 @@ inline void gcode_M303() {
|
|
|
|
#if ENABLED(SCARA)
|
|
|
|
#if ENABLED(SCARA)
|
|
|
|
bool SCARA_move_to_cal(uint8_t delta_x, uint8_t delta_y) {
|
|
|
|
bool SCARA_move_to_cal(uint8_t delta_x, uint8_t delta_y) {
|
|
|
|
//SoftEndsEnabled = false; // Ignore soft endstops during calibration
|
|
|
|
//SoftEndsEnabled = false; // Ignore soft endstops during calibration
|
|
|
|
//SERIAL_ECHOLN(" Soft endstops disabled ");
|
|
|
|
//SERIAL_ECHOLNPGM(" Soft endstops disabled");
|
|
|
|
if (IsRunning()) {
|
|
|
|
if (IsRunning()) {
|
|
|
|
//gcode_get_destination(); // For X Y Z E F
|
|
|
|
//gcode_get_destination(); // For X Y Z E F
|
|
|
|
delta[X_AXIS] = delta_x;
|
|
|
|
delta[X_AXIS] = delta_x;
|
|
|
@ -5758,7 +5750,7 @@ inline void gcode_M303() {
|
|
|
|
* M360: SCARA calibration: Move to cal-position ThetaA (0 deg calibration)
|
|
|
|
* M360: SCARA calibration: Move to cal-position ThetaA (0 deg calibration)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
inline bool gcode_M360() {
|
|
|
|
inline bool gcode_M360() {
|
|
|
|
SERIAL_ECHOLN(" Cal: Theta 0 ");
|
|
|
|
SERIAL_ECHOLNPGM(" Cal: Theta 0");
|
|
|
|
return SCARA_move_to_cal(0, 120);
|
|
|
|
return SCARA_move_to_cal(0, 120);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -5766,7 +5758,7 @@ inline void gcode_M303() {
|
|
|
|
* M361: SCARA calibration: Move to cal-position ThetaB (90 deg calibration - steps per degree)
|
|
|
|
* M361: SCARA calibration: Move to cal-position ThetaB (90 deg calibration - steps per degree)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
inline bool gcode_M361() {
|
|
|
|
inline bool gcode_M361() {
|
|
|
|
SERIAL_ECHOLN(" Cal: Theta 90 ");
|
|
|
|
SERIAL_ECHOLNPGM(" Cal: Theta 90");
|
|
|
|
return SCARA_move_to_cal(90, 130);
|
|
|
|
return SCARA_move_to_cal(90, 130);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -5774,7 +5766,7 @@ inline void gcode_M303() {
|
|
|
|
* M362: SCARA calibration: Move to cal-position PsiA (0 deg calibration)
|
|
|
|
* M362: SCARA calibration: Move to cal-position PsiA (0 deg calibration)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
inline bool gcode_M362() {
|
|
|
|
inline bool gcode_M362() {
|
|
|
|
SERIAL_ECHOLN(" Cal: Psi 0 ");
|
|
|
|
SERIAL_ECHOLNPGM(" Cal: Psi 0");
|
|
|
|
return SCARA_move_to_cal(60, 180);
|
|
|
|
return SCARA_move_to_cal(60, 180);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -5782,7 +5774,7 @@ inline void gcode_M303() {
|
|
|
|
* M363: SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree)
|
|
|
|
* M363: SCARA calibration: Move to cal-position PsiB (90 deg calibration - steps per degree)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
inline bool gcode_M363() {
|
|
|
|
inline bool gcode_M363() {
|
|
|
|
SERIAL_ECHOLN(" Cal: Psi 90 ");
|
|
|
|
SERIAL_ECHOLNPGM(" Cal: Psi 90");
|
|
|
|
return SCARA_move_to_cal(50, 90);
|
|
|
|
return SCARA_move_to_cal(50, 90);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -5790,7 +5782,7 @@ inline void gcode_M303() {
|
|
|
|
* M364: SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position)
|
|
|
|
* M364: SCARA calibration: Move to cal-position PSIC (90 deg to Theta calibration position)
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
inline bool gcode_M364() {
|
|
|
|
inline bool gcode_M364() {
|
|
|
|
SERIAL_ECHOLN(" Cal: Theta-Psi 90 ");
|
|
|
|
SERIAL_ECHOLNPGM(" Cal: Theta-Psi 90");
|
|
|
|
return SCARA_move_to_cal(45, 135);
|
|
|
|
return SCARA_move_to_cal(45, 135);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -6109,6 +6101,7 @@ inline void gcode_M503() {
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
SERIAL_ECHOPGM(MSG_Z_MIN);
|
|
|
|
SERIAL_ECHOPGM(MSG_Z_MIN);
|
|
|
|
SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MIN);
|
|
|
|
SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MIN);
|
|
|
|
|
|
|
|
SERIAL_CHAR(' ');
|
|
|
|
SERIAL_ECHOPGM(MSG_Z_MAX);
|
|
|
|
SERIAL_ECHOPGM(MSG_Z_MAX);
|
|
|
|
SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MAX);
|
|
|
|
SERIAL_ECHO(Z_PROBE_OFFSET_RANGE_MAX);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -6625,7 +6618,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHO_START;
|
|
|
|
SERIAL_ECHO(MSG_ACTIVE_EXTRUDER);
|
|
|
|
SERIAL_ECHOPGM(MSG_ACTIVE_EXTRUDER);
|
|
|
|
SERIAL_PROTOCOLLN((int)active_extruder);
|
|
|
|
SERIAL_PROTOCOLLN((int)active_extruder);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|