Clean up "else" and other spacing

This commit is contained in:
Scott Lahteine
2015-10-13 03:51:34 -07:00
committed by Richard Wackerbarth
parent 9b23490f01
commit 9bdab4f3a8
12 changed files with 115 additions and 68 deletions

View File

@ -1688,7 +1688,8 @@ static void setup_for_endstop_move() {
if (a < b) {
if (b < c) median = b;
if (c < a) median = a;
} else { // b <= a
}
else { // b <= a
if (c < b) median = b;
if (a < c) median = a;
}
@ -1783,7 +1784,8 @@ static void setup_for_endstop_move() {
#endif
do_blocking_move_to_x(X_MAX_POS + SLED_DOCKING_OFFSET + offset - 1); // Dock sled a bit closer to ensure proper capturing
digitalWrite(SLED_PIN, LOW); // turn off magnet
} else {
}
else {
float z_loc = current_position[Z_AXIS];
if (z_loc < Z_RAISE_BEFORE_PROBING + 5) z_loc = Z_RAISE_BEFORE_PROBING;
do_blocking_move_to(X_MAX_POS + SLED_DOCKING_OFFSET + offset, current_position[Y_AXIS], z_loc); // this also updates current_position
@ -2696,7 +2698,8 @@ inline void gcode_G28() {
SERIAL_PROTOCOLPGM("X out of range (1-" STRINGIFY(MESH_NUM_X_POINTS) ").\n");
return;
}
} else {
}
else {
SERIAL_PROTOCOLPGM("X not entered.\n");
return;
}
@ -2706,7 +2709,8 @@ inline void gcode_G28() {
SERIAL_PROTOCOLPGM("Y out of range (1-" STRINGIFY(MESH_NUM_Y_POINTS) ").\n");
return;
}
} else {
}
else {
SERIAL_PROTOCOLPGM("Y not entered.\n");
return;
}
@ -6381,25 +6385,29 @@ void mesh_plan_buffer_line(float x, float y, float z, const float e, float feed_
ny = current_position[Y_AXIS] + (y - current_position[Y_AXIS]) * normalized_dist;
ne = current_position[E_AXIS] + (e - current_position[E_AXIS]) * normalized_dist;
x_splits ^= BIT(ix);
} else if (ix < pix && (x_splits) & BIT(pix)) {
}
else if (ix < pix && (x_splits) & BIT(pix)) {
nx = mbl.get_x(pix);
normalized_dist = (nx - current_position[X_AXIS]) / (x - current_position[X_AXIS]);
ny = current_position[Y_AXIS] + (y - current_position[Y_AXIS]) * normalized_dist;
ne = current_position[E_AXIS] + (e - current_position[E_AXIS]) * normalized_dist;
x_splits ^= BIT(pix);
} else if (iy > piy && (y_splits) & BIT(iy)) {
}
else if (iy > piy && (y_splits) & BIT(iy)) {
ny = mbl.get_y(iy);
normalized_dist = (ny - current_position[Y_AXIS]) / (y - current_position[Y_AXIS]);
nx = current_position[X_AXIS] + (x - current_position[X_AXIS]) * normalized_dist;
ne = current_position[E_AXIS] + (e - current_position[E_AXIS]) * normalized_dist;
y_splits ^= BIT(iy);
} else if (iy < piy && (y_splits) & BIT(piy)) {
}
else if (iy < piy && (y_splits) & BIT(piy)) {
ny = mbl.get_y(piy);
normalized_dist = (ny - current_position[Y_AXIS]) / (y - current_position[Y_AXIS]);
nx = current_position[X_AXIS] + (x - current_position[X_AXIS]) * normalized_dist;
ne = current_position[E_AXIS] + (e - current_position[E_AXIS]) * normalized_dist;
y_splits ^= BIT(piy);
} else {
}
else {
// Already split on a border
plan_buffer_line(x, y, z, e, feed_rate, extruder);
set_current_to_destination();