瀏覽代碼

Wrap defines in parentheses in configs, M48

Scott Lahteine 9 年之前
父節點
當前提交
4b75b11a53
共有 2 個檔案被更改,包括 10 行新增10 行删除
  1. 4
    4
      Marlin/Marlin_main.cpp
  2. 6
    6
      Marlin/example_configurations/Hephestos_2/Configuration.h

+ 4
- 4
Marlin/Marlin_main.cpp 查看文件

4012
     if (Z_start_location < Z_RAISE_BEFORE_PROBING * 2.0)
4012
     if (Z_start_location < Z_RAISE_BEFORE_PROBING * 2.0)
4013
       do_blocking_move_to_z(Z_start_location);
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
      * OK, do the initial probe to get us close to the bed.
4018
      * OK, do the initial probe to get us close to the bed.
4072
           while (angle < 0.0)     // outside of this range.   It looks like they behave correctly with
4072
           while (angle < 0.0)     // outside of this range.   It looks like they behave correctly with
4073
             angle += 360.0;       // numbers outside of the range, but just to be safe we clamp them.
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
           #if DISABLED(DELTA)
4078
           #if DISABLED(DELTA)
4079
             X_current = constrain(X_current, X_MIN_POS, X_MAX_POS);
4079
             X_current = constrain(X_current, X_MIN_POS, X_MAX_POS);
4111
        * height. This gets us back to the probe location at the same height that
4111
        * height. This gets us back to the probe location at the same height that
4112
        * we have been running around the circle at.
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
       if (deploy_probe_for_each_reading)
4115
       if (deploy_probe_for_each_reading)
4116
         sample_set[n] = probe_pt(X_probe_location, Y_probe_location, Z_RAISE_BEFORE_PROBING, ProbeDeployAndStow, verbose_level);
4116
         sample_set[n] = probe_pt(X_probe_location, Y_probe_location, Z_RAISE_BEFORE_PROBING, ProbeDeployAndStow, verbose_level);
4117
       else {
4117
       else {

+ 6
- 6
Marlin/example_configurations/Hephestos_2/Configuration.h 查看文件

512
 
512
 
513
 #if ENABLED(MESH_BED_LEVELING)
513
 #if ENABLED(MESH_BED_LEVELING)
514
   #define MESH_MIN_X 10
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
   #define MESH_MIN_Y 10
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
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
518
   #define MESH_NUM_X_POINTS 3  // Don't use more than 7 points per axis, implementation limited.
519
   #define MESH_NUM_Y_POINTS 3
519
   #define MESH_NUM_Y_POINTS 3
520
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
520
   #define MESH_HOME_SEARCH_Z 4  // Z after Home, bed somewhere below but above 0.0.
557
   #if ENABLED(AUTO_BED_LEVELING_GRID)
557
   #if ENABLED(AUTO_BED_LEVELING_GRID)
558
 
558
 
559
     #define LEFT_PROBE_BED_POSITION  X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER
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
     #define FRONT_PROBE_BED_POSITION Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
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
     #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
564
     #define MIN_PROBE_EDGE 10 // The Z probe minimum square sides can be no smaller than this.
565
 
565
 
573
     // A simple cross-product is used to estimate the plane of the bed.
573
     // A simple cross-product is used to estimate the plane of the bed.
574
     #define ABL_PROBE_PT_1_X X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER
574
     #define ABL_PROBE_PT_1_X X_MIN_POS + X_PROBE_OFFSET_FROM_EXTRUDER
575
     #define ABL_PROBE_PT_1_Y Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
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
     #define ABL_PROBE_PT_2_Y Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
577
     #define ABL_PROBE_PT_2_Y Y_MIN_POS + Y_PROBE_OFFSET_FROM_EXTRUDER
578
     #define ABL_PROBE_PT_3_X ((X_MIN_POS + X_MAX_POS) / 2)
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
   #endif // AUTO_BED_LEVELING_GRID
581
   #endif // AUTO_BED_LEVELING_GRID
582
 
582
 

Loading…
取消
儲存