Merge pull request #1577 from thinkyhead/fix_gcode_g29

Fix compile error in gcode_G29
This commit is contained in:
Scott Lahteine 2015-03-06 14:55:05 -08:00
commit d3660d22ae

View File

@ -1772,8 +1772,6 @@ inline void gcode_G28() {
inline void gcode_G29() { inline void gcode_G29() {
float x_tmp, y_tmp, z_tmp, real_z;
// Prevent user from running a G29 without first homing in X and Y // Prevent user from running a G29 without first homing in X and Y
if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) { if (!axis_known_position[X_AXIS] || !axis_known_position[Y_AXIS]) {
LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN); LCD_MESSAGEPGM(MSG_POSITION_UNKNOWN);
@ -1782,28 +1780,26 @@ inline void gcode_G28() {
return; return;
} }
bool enhanced_g29 = code_seen('E') || code_seen('e');
#ifdef AUTO_BED_LEVELING_GRID
// Example Syntax: G29 N4 V2 E T
int verbose_level = 1; int verbose_level = 1;
float x_tmp, y_tmp, z_tmp, real_z;
bool topo_flag = code_seen('T') || code_seen('t');
if (code_seen('V') || code_seen('v')) { if (code_seen('V') || code_seen('v')) {
verbose_level = code_value(); verbose_level = code_value_long();
if (verbose_level < 0 || verbose_level > 4) { if (verbose_level < 0 || verbose_level > 4) {
SERIAL_PROTOCOLPGM("?(V)erbose Level is implausible (0-4).\n"); SERIAL_PROTOCOLPGM("?(V)erbose Level is implausible (0-4).\n");
return; return;
} }
if (verbose_level > 0) {
SERIAL_PROTOCOLPGM("G29 Enhanced Auto Bed Leveling Code V1.25:\n");
SERIAL_PROTOCOLPGM("Full support at: http://3dprintboard.com/forum.php\n");
if (verbose_level > 2) topo_flag = true;
}
} }
bool enhanced_g29 = code_seen('E') || code_seen('e');
#ifdef AUTO_BED_LEVELING_GRID
bool topo_flag = verbose_level > 2 || code_seen('T') || code_seen('t');
if (verbose_level > 0)
SERIAL_PROTOCOLPGM("G29 Auto Bed Leveling\n");
int auto_bed_leveling_grid_points = code_seen('P') ? code_value_long() : AUTO_BED_LEVELING_GRID_POINTS; int auto_bed_leveling_grid_points = code_seen('P') ? code_value_long() : AUTO_BED_LEVELING_GRID_POINTS;
if (auto_bed_leveling_grid_points < 2 || auto_bed_leveling_grid_points > AUTO_BED_LEVELING_GRID_POINTS) { if (auto_bed_leveling_grid_points < 2 || auto_bed_leveling_grid_points > AUTO_BED_LEVELING_GRID_POINTS) {
SERIAL_PROTOCOLPGM("?Number of probed (P)oints is implausible (2 minimum).\n"); SERIAL_PROTOCOLPGM("?Number of probed (P)oints is implausible (2 minimum).\n");
@ -2418,10 +2414,8 @@ inline void gcode_M42() {
} }
} }
if (verbose_level > 0) { if (verbose_level > 0)
SERIAL_PROTOCOLPGM("M48 Z-Probe Repeatability test. Version 2.00\n"); SERIAL_PROTOCOLPGM("M48 Z-Probe Repeatability test\n");
SERIAL_PROTOCOLPGM("Full support at: http://3dprintboard.com/forum.php\n");
}
if (code_seen('n')) { if (code_seen('n')) {
n_samples = code_value(); n_samples = code_value();