Преглед на файлове

Clean up probe accessors

Scott Lahteine преди 5 години
родител
ревизия
47c19aa2b3
променени са 1 файла, в които са добавени 25 реда и са изтрити 19 реда
  1. 25
    19
      Marlin/src/module/probe.h

+ 25
- 19
Marlin/src/module/probe.h Целия файл

@@ -62,54 +62,60 @@
62 62
 
63 63
 #if HAS_BED_PROBE || ENABLED(PROBE_MANUALLY)
64 64
   #if IS_KINEMATIC
65
-    constexpr float printable_radius =
65
+    constexpr float printable_radius = (
66 66
       #if ENABLED(DELTA)
67
-        DELTA_PRINTABLE_RADIUS;
67
+        DELTA_PRINTABLE_RADIUS
68 68
       #elif IS_SCARA
69
-        SCARA_PRINTABLE_RADIUS;
69
+        SCARA_PRINTABLE_RADIUS
70 70
       #endif
71
-    
71
+    );
72
+
72 73
     inline float probe_radius() {
73
-      return printable_radius -
74
+      return printable_radius - (
74 75
         #if HAS_BED_PROBE
75
-          _MAX(MIN_PROBE_EDGE, HYPOT(probe_offset.x, probe_offset.y));
76
+          _MAX(MIN_PROBE_EDGE, HYPOT(probe_offset.x, probe_offset.y))
76 77
         #else
77
-          MIN_PROBE_EDGE;
78
+          MIN_PROBE_EDGE
78 79
         #endif
80
+      );
79 81
     }
80 82
   #endif
81 83
 
82 84
   inline float probe_min_x() {
83
-    return
85
+    return (
84 86
       #if IS_KINEMATIC
85
-        (X_CENTER) - probe_radius();
87
+        (X_CENTER) - probe_radius()
86 88
       #else
87
-        _MAX((X_MIN_BED) + (MIN_PROBE_EDGE_LEFT), (X_MIN_POS) + probe_offset.x);
89
+        _MAX((X_MIN_BED) + (MIN_PROBE_EDGE_LEFT), (X_MIN_POS) + probe_offset.x)
88 90
       #endif
91
+    );
89 92
   }
90 93
   inline float probe_max_x() {
91
-    return
94
+    return (
92 95
       #if IS_KINEMATIC
93
-        (X_CENTER) + probe_radius();
96
+        (X_CENTER) + probe_radius()
94 97
       #else
95
-        _MIN((X_MAX_BED) - (MIN_PROBE_EDGE_RIGHT), (X_MAX_POS) + probe_offset.x);
98
+        _MIN((X_MAX_BED) - (MIN_PROBE_EDGE_RIGHT), (X_MAX_POS) + probe_offset.x)
96 99
       #endif
100
+    );
97 101
   }
98 102
   inline float probe_min_y() {
99
-    return 
103
+    return (
100 104
       #if IS_KINEMATIC
101
-        (Y_CENTER) - probe_radius();
105
+        (Y_CENTER) - probe_radius()
102 106
       #else
103
-        _MAX((Y_MIN_BED) + (MIN_PROBE_EDGE_FRONT), (Y_MIN_POS) + probe_offset.y);
107
+        _MAX((Y_MIN_BED) + (MIN_PROBE_EDGE_FRONT), (Y_MIN_POS) + probe_offset.y)
104 108
       #endif
109
+    );
105 110
   }
106 111
   inline float probe_max_y() {
107
-    return 
112
+    return (
108 113
       #if IS_KINEMATIC
109
-        (Y_CENTER) + probe_radius();
114
+        (Y_CENTER) + probe_radius()
110 115
       #else
111
-        _MIN((Y_MAX_BED) - (MIN_PROBE_EDGE_BACK), (Y_MAX_POS) + probe_offset.y);
116
+        _MIN((Y_MAX_BED) - (MIN_PROBE_EDGE_BACK), (Y_MAX_POS) + probe_offset.y)
112 117
       #endif
118
+    );
113 119
   }
114 120
 
115 121
   #if NEEDS_THREE_PROBE_POINTS

Loading…
Отказ
Запис