Browse Source

🎨 General cleanup, comments

Scott Lahteine 2 years ago
parent
commit
6b47db3a68

+ 1
- 0
Marlin/src/core/types.h View File

@@ -118,6 +118,7 @@ typedef IF<(NUM_AXIS_ENUMS > 8), uint16_t, uint8_t>::type axis_bits_t;
118 118
 #define LOOP_LINEAR_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, LINEAR_AXES)
119 119
 #define LOOP_LOGICAL_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, LOGICAL_AXES)
120 120
 #define LOOP_DISTINCT_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, DISTINCT_AXES)
121
+#define LOOP_DISTINCT_E(VAR) LOOP_L_N(VAR, DISTINCT_E)
121 122
 
122 123
 //
123 124
 // feedRate_t is just a humble float

+ 2
- 1
Marlin/src/gcode/host/M16.cpp View File

@@ -26,6 +26,7 @@
26 26
 
27 27
 #include "../gcode.h"
28 28
 #include "../../MarlinCore.h"
29
+#include "../../lcd/marlinui.h"
29 30
 
30 31
 /**
31 32
  * M16: Expected Printer Check
@@ -37,4 +38,4 @@ void GcodeSuite::M16() {
37 38
 
38 39
 }
39 40
 
40
-#endif
41
+#endif // EXPECTED_PRINTER_CHECK

+ 1
- 1
Marlin/src/gcode/host/M360.cpp View File

@@ -180,7 +180,7 @@ void GcodeSuite::M360() {
180 180
   //
181 181
   config_line(F("NumExtruder"), EXTRUDERS);
182 182
   #if HAS_EXTRUDERS
183
-    LOOP_L_N(e, EXTRUDERS) {
183
+    EXTRUDER_LOOP() {
184 184
       config_line_e(e, JERK_STR, TERN(HAS_LINEAR_E_JERK, planner.max_e_jerk[E_INDEX_N(e)], TERN(HAS_CLASSIC_JERK, planner.max_jerk.e, DEFAULT_EJERK)));
185 185
       config_line_e(e, F("MaxSpeed"), planner.settings.max_feedrate_mm_s[E_AXIS_N(e)]);
186 186
       config_line_e(e, F("Acceleration"), planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(e)]);

+ 15
- 16
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_acceleration_screen.cpp View File

@@ -44,10 +44,10 @@ void MaxAccelerationScreen::onRedraw(draw_mode_t what) {
44 44
     w.color(e_axis).adjuster( 8, F(STR_E0), getAxisMaxAcceleration_mm_s2(E0) );
45 45
     w.color(e_axis).adjuster(10, F(STR_E1), getAxisMaxAcceleration_mm_s2(E1) );
46 46
     #if DISTINCT_E > 2
47
-    w.color(e_axis).adjuster(12, F(STR_E2), getAxisMaxAcceleration_mm_s2(E2) );
48
-    #endif
49
-    #if DISTINCT_E > 3
50
-    w.color(e_axis).adjuster(14, F(STR_E3), getAxisMaxAcceleration_mm_s2(E3) );
47
+      w.color(e_axis).adjuster(12, F(STR_E2), getAxisMaxAcceleration_mm_s2(E2) );
48
+      #if DISTINCT_E > 3
49
+        w.color(e_axis).adjuster(14, F(STR_E3), getAxisMaxAcceleration_mm_s2(E3) );
50
+      #endif
51 51
     #endif
52 52
   #endif
53 53
   w.increments();
@@ -65,19 +65,18 @@ bool MaxAccelerationScreen::onTouchHeld(uint8_t tag) {
65 65
     case  8: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E0); break;
66 66
     case  9: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E0); break;
67 67
     #if DISTINCT_E > 1
68
-    case 10: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E1); break;
69
-    case 11: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E1); break;
70
-    #endif
71
-    #if DISTINCT_E > 2
72
-    case 12: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E2); break;
73
-    case 13: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E2); break;
74
-    #endif
75
-    #if DISTINCT_E > 3
76
-    case 14: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E3); break;
77
-    case 15: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E3); break;
68
+      case 10: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E1); break;
69
+      case 11: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E1); break;
70
+      #if DISTINCT_E > 2
71
+        case 12: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E2); break;
72
+        case 13: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E2); break;
73
+        #if DISTINCT_E > 3
74
+          case 14: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E3); break;
75
+          case 15: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E3); break;
76
+        #endif
77
+      #endif
78 78
     #endif
79
-    default:
80
-      return false;
79
+    default: return false;
81 80
   }
82 81
   return true;
83 82
 }

+ 19
- 20
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_velocity_screen.cpp View File

@@ -46,9 +46,9 @@ void MaxVelocityScreen::onRedraw(draw_mode_t what) {
46 46
     w.color(e_axis)  .adjuster( 10, F(STR_E1), getAxisMaxFeedrate_mm_s(E1) );
47 47
     #if EXTRUDERS > 2
48 48
       w.color(e_axis).adjuster( 12, F(STR_E2), getAxisMaxFeedrate_mm_s(E2) );
49
-    #endif
50
-    #if EXTRUDERS > 3
51
-      w.color(e_axis).adjuster( 14, F(STR_E3), getAxisMaxFeedrate_mm_s(E3) );
49
+      #if EXTRUDERS > 3
50
+        w.color(e_axis).adjuster( 14, F(STR_E3), getAxisMaxFeedrate_mm_s(E3) );
51
+      #endif
52 52
     #endif
53 53
   #endif
54 54
   w.increments();
@@ -63,24 +63,23 @@ bool MaxVelocityScreen::onTouchHeld(uint8_t tag) {
63 63
     case  5: UI_INCREMENT(AxisMaxFeedrate_mm_s, Y); break;
64 64
     case  6: UI_DECREMENT(AxisMaxFeedrate_mm_s, Z); break;
65 65
     case  7: UI_INCREMENT(AxisMaxFeedrate_mm_s, Z); break;
66
-    #if DISTINCT_E > 0
67
-    case  8: UI_DECREMENT(AxisMaxFeedrate_mm_s, E0); break;
68
-    case  9: UI_INCREMENT(AxisMaxFeedrate_mm_s, E0); break;
69
-    #endif
70
-    #if DISTINCT_E > 1
71
-    case 10: UI_DECREMENT(AxisMaxFeedrate_mm_s, E1); break;
72
-    case 11: UI_INCREMENT(AxisMaxFeedrate_mm_s, E1); break;
73
-    #endif
74
-    #if DISTINCT_E > 2
75
-    case 12: UI_DECREMENT(AxisMaxFeedrate_mm_s, E2); break;
76
-    case 13: UI_INCREMENT(AxisMaxFeedrate_mm_s, E2); break;
77
-    #endif
78
-    #if DISTINCT_E > 3
79
-    case 14: UI_DECREMENT(AxisMaxFeedrate_mm_s, E3); break;
80
-    case 15: UI_INCREMENT(AxisMaxFeedrate_mm_s, E3); break;
66
+    #if DISTINCT_E
67
+      case  8: UI_DECREMENT(AxisMaxFeedrate_mm_s, E0); break;
68
+      case  9: UI_INCREMENT(AxisMaxFeedrate_mm_s, E0); break;
69
+      #if DISTINCT_E > 1
70
+        case 10: UI_DECREMENT(AxisMaxFeedrate_mm_s, E1); break;
71
+        case 11: UI_INCREMENT(AxisMaxFeedrate_mm_s, E1); break;
72
+        #if DISTINCT_E > 2
73
+          case 12: UI_DECREMENT(AxisMaxFeedrate_mm_s, E2); break;
74
+          case 13: UI_INCREMENT(AxisMaxFeedrate_mm_s, E2); break;
75
+          #if DISTINCT_E > 3
76
+            case 14: UI_DECREMENT(AxisMaxFeedrate_mm_s, E3); break;
77
+            case 15: UI_INCREMENT(AxisMaxFeedrate_mm_s, E3); break;
78
+          #endif
79
+        #endif
80
+      #endif
81 81
     #endif
82
-    default:
83
-      return false;
82
+    default: return false;
84 83
   }
85 84
   SaveSettingsDialogBox::settingsChanged();
86 85
   return true;

+ 9
- 0
Marlin/src/module/probe.h View File

@@ -188,6 +188,15 @@ public:
188 188
       }
189 189
     #endif
190 190
 
191
+    /**
192
+     * The nozzle is only able to move within the physical bounds of the machine.
193
+     * If the PROBE has an OFFSET Marlin may need to apply additional limits so
194
+     * the probe can be prevented from going to unreachable points.
195
+     *
196
+     * e.g., If the PROBE is to the LEFT of the NOZZLE, it will be limited in how
197
+     * close it can get the RIGHT edge of the bed (unless the nozzle is able move
198
+     * far enough past the right edge).
199
+     */
191 200
     static constexpr float _min_x(const xy_pos_t &probe_offset_xy=offset_xy) {
192 201
       return TERN(IS_KINEMATIC,
193 202
         (X_CENTER) - probe_radius(probe_offset_xy),

+ 1
- 0
Marlin/src/pins/pinsDebug.h View File

@@ -19,6 +19,7 @@
19 19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
+#pragma once
22 23
 
23 24
 #include "../inc/MarlinConfig.h"
24 25
 

Loading…
Cancel
Save