Browse Source

Merge pull request #4888 from thinkyhead/fix_warnings_etc

Suppress warnings, fix nonlinear_z_offset
Scott Lahteine 8 years ago
parent
commit
8061f1fac9
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      Marlin/Marlin_main.cpp

+ 3
- 4
Marlin/Marlin_main.cpp View File

1671
 
1671
 
1672
 #endif //HAS_BED_PROBE
1672
 #endif //HAS_BED_PROBE
1673
 
1673
 
1674
-#if ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || ENABLED(Z_SAFE_HOMING) || HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE)
1674
+#if ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE)
1675
   static bool axis_unhomed_error(const bool x, const bool y, const bool z) {
1675
   static bool axis_unhomed_error(const bool x, const bool y, const bool z) {
1676
     const bool xx = x && !axis_homed[X_AXIS],
1676
     const bool xx = x && !axis_homed[X_AXIS],
1677
                yy = y && !axis_homed[Y_AXIS],
1677
                yy = y && !axis_homed[Y_AXIS],
2520
   #endif
2520
   #endif
2521
 ) {
2521
 ) {
2522
   float dx = RAW_X_POSITION(target[X_AXIS]),
2522
   float dx = RAW_X_POSITION(target[X_AXIS]),
2523
-        dy = RAW_Y_POSITION(target[Y_AXIS]),
2524
-        dz = RAW_Z_POSITION(target[Z_AXIS]);
2523
+        dy = RAW_Y_POSITION(target[Y_AXIS]);
2525
 
2524
 
2526
   #if HAS_BED_PROBE
2525
   #if HAS_BED_PROBE
2527
     if (by_probe) {
2526
     if (by_probe) {
2540
   #elif ENABLED(DELTA)
2539
   #elif ENABLED(DELTA)
2541
     return HYPOT2(dx, dy) <= sq(DELTA_PRINTABLE_RADIUS);
2540
     return HYPOT2(dx, dy) <= sq(DELTA_PRINTABLE_RADIUS);
2542
   #else
2541
   #else
2542
+    const float dz = RAW_Z_POSITION(target[Z_AXIS]);
2543
     return dx >= X_MIN_POS - 0.0001 && dx <= X_MAX_POS + 0.0001
2543
     return dx >= X_MIN_POS - 0.0001 && dx <= X_MAX_POS + 0.0001
2544
         && dy >= Y_MIN_POS - 0.0001 && dy <= Y_MAX_POS + 0.0001
2544
         && dy >= Y_MIN_POS - 0.0001 && dy <= Y_MAX_POS + 0.0001
2545
         && dz >= Z_MIN_POS - 0.0001 && dz <= Z_MAX_POS + 0.0001;
2545
         && dz >= Z_MIN_POS - 0.0001 && dz <= Z_MAX_POS + 0.0001;
7785
 
7785
 
7786
   // Get the Z adjustment for non-linear bed leveling
7786
   // Get the Z adjustment for non-linear bed leveling
7787
   float nonlinear_z_offset(float cartesian[XYZ]) {
7787
   float nonlinear_z_offset(float cartesian[XYZ]) {
7788
-    if (planner.abl_enabled) return;
7789
 
7788
 
7790
     int half_x = (ABL_GRID_POINTS_X - 1) / 2,
7789
     int half_x = (ABL_GRID_POINTS_X - 1) / 2,
7791
         half_y = (ABL_GRID_POINTS_Y - 1) / 2;
7790
         half_y = (ABL_GRID_POINTS_Y - 1) / 2;

Loading…
Cancel
Save