Kaynağa Gözat

Wrap defines in parentheses in configs, M48

Scott Lahteine 9 yıl önce
ebeveyn
işleme
4b75b11a53

+ 4
- 4
Marlin/Marlin_main.cpp Dosyayı Görüntüle

@@ -4012,7 +4012,7 @@ inline void gcode_M42() {
4012 4012
     if (Z_start_location < Z_RAISE_BEFORE_PROBING * 2.0)
4013 4013
       do_blocking_move_to_z(Z_start_location);
4014 4014
 
4015
-    do_blocking_move_to_xy(X_probe_location - X_PROBE_OFFSET_FROM_EXTRUDER, Y_probe_location - Y_PROBE_OFFSET_FROM_EXTRUDER);
4015
+    do_blocking_move_to_xy(X_probe_location - (X_PROBE_OFFSET_FROM_EXTRUDER), Y_probe_location - (Y_PROBE_OFFSET_FROM_EXTRUDER));
4016 4016
 
4017 4017
     /**
4018 4018
      * OK, do the initial probe to get us close to the bed.
@@ -4072,8 +4072,8 @@ inline void gcode_M42() {
4072 4072
           while (angle < 0.0)     // outside of this range.   It looks like they behave correctly with
4073 4073
             angle += 360.0;       // numbers outside of the range, but just to be safe we clamp them.
4074 4074
 
4075
-          X_current = X_probe_location - X_PROBE_OFFSET_FROM_EXTRUDER + cos(RADIANS(angle)) * radius;
4076
-          Y_current = Y_probe_location - Y_PROBE_OFFSET_FROM_EXTRUDER + sin(RADIANS(angle)) * radius;
4075
+          X_current = X_probe_location - (X_PROBE_OFFSET_FROM_EXTRUDER) + cos(RADIANS(angle)) * radius;
4076
+          Y_current = Y_probe_location - (Y_PROBE_OFFSET_FROM_EXTRUDER) + sin(RADIANS(angle)) * radius;
4077 4077
 
4078 4078
           #if DISABLED(DELTA)
4079 4079
             X_current = constrain(X_current, X_MIN_POS, X_MAX_POS);
@@ -4111,7 +4111,7 @@ inline void gcode_M42() {
4111 4111
        * height. This gets us back to the probe location at the same height that
4112 4112
        * we have been running around the circle at.
4113 4113
        */
4114
-      do_blocking_move_to_xy(X_probe_location - X_PROBE_OFFSET_FROM_EXTRUDER, Y_probe_location - Y_PROBE_OFFSET_FROM_EXTRUDER);
4114
+      do_blocking_move_to_xy(X_probe_location - (X_PROBE_OFFSET_FROM_EXTRUDER), Y_probe_location - (Y_PROBE_OFFSET_FROM_EXTRUDER));
4115 4115
       if (deploy_probe_for_each_reading)
4116 4116
         sample_set[n] = probe_pt(X_probe_location, Y_probe_location, Z_RAISE_BEFORE_PROBING, ProbeDeployAndStow, verbose_level);
4117 4117
       else {

+ 6
- 6
Marlin/example_configurations/Hephestos_2/Configuration.h Dosyayı Görüntüle

@@ -512,9 +512,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
512 512
 
513 513
 #if ENABLED(MESH_BED_LEVELING)
514 514
   #define MESH_MIN_X 10
515
-  #define MESH_MAX_X (X_MAX_POS - MESH_MIN_X)
515
+  #define MESH_MAX_X (X_MAX_POS - (MESH_MIN_X))
516 516
   #define MESH_MIN_Y 10
517
-  #define MESH_MAX_Y (Y_MAX_POS - MESH_MIN_Y)
517
+  #define MESH_MAX_Y (Y_MAX_POS - (MESH_MIN_Y))
518 518
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
519 519
   #define MESH_NUM_Y_POINTS 3
520 520
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
@@ -557,9 +557,9 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
557 557
   #if ENABLED(AUTO_BED_LEVELING_GRID)
558 558
 
559 559
     #define LEFT_PROBE_BED_POSITION  X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER
560
-    #define RIGHT_PROBE_BED_POSITION X_MAX_POS - X_PROBE_OFFSET_FROM_EXTRUDER
560
+    #define RIGHT_PROBE_BED_POSITION X_MAX_POS - (X_PROBE_OFFSET_FROM_EXTRUDER)
561 561
     #define FRONT_PROBE_BED_POSITION Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
562
-    #define BACK_PROBE_BED_POSITION  Y_MAX_POS - Y_PROBE_OFFSET_FROM_EXTRUDER
562
+    #define BACK_PROBE_BED_POSITION  Y_MAX_POS - (Y_PROBE_OFFSET_FROM_EXTRUDER)
563 563
 
564 564
     #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
565 565
 
@@ -573,10 +573,10 @@ const bool Z_MIN_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the l
573 573
     // A simple cross-product is used to estimate the plane of the bed.
574 574
     #define ABL_PROBE_PT_1_X X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER
575 575
     #define ABL_PROBE_PT_1_Y Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
576
-    #define ABL_PROBE_PT_2_X X_MAX_POS - X_PROBE_OFFSET_FROM_EXTRUDER
576
+    #define ABL_PROBE_PT_2_X X_MAX_POS - (X_PROBE_OFFSET_FROM_EXTRUDER)
577 577
     #define ABL_PROBE_PT_2_Y Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
578 578
     #define ABL_PROBE_PT_3_X ((X_MIN_POS + X_MAX_POS) / 2)
579
-    #define ABL_PROBE_PT_3_Y Y_MAX_POS - Y_PROBE_OFFSET_FROM_EXTRUDER
579
+    #define ABL_PROBE_PT_3_Y Y_MAX_POS - (Y_PROBE_OFFSET_FROM_EXTRUDER)
580 580
 
581 581
   #endif // AUTO_BED_LEVELING_GRID
582 582
 

Loading…
İptal
Kaydet