Skip to content

Commit 6b47db3

Browse files
committed
🎨 General cleanup, comments
1 parent a80a303 commit 6b47db3

File tree

7 files changed

+48
-38
lines changed

7 files changed

+48
-38
lines changed

Marlin/src/core/types.h

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ typedef IF<(NUM_AXIS_ENUMS > 8), uint16_t, uint8_t>::type axis_bits_t;
118118
#define LOOP_LINEAR_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, LINEAR_AXES)
119119
#define LOOP_LOGICAL_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, LOGICAL_AXES)
120120
#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)
121122

122123
//
123124
// feedRate_t is just a humble float

Marlin/src/gcode/host/M16.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
#include "../gcode.h"
2828
#include "../../MarlinCore.h"
29+
#include "../../lcd/marlinui.h"
2930

3031
/**
3132
* M16: Expected Printer Check
@@ -37,4 +38,4 @@ void GcodeSuite::M16() {
3738

3839
}
3940

40-
#endif
41+
#endif // EXPECTED_PRINTER_CHECK

Marlin/src/gcode/host/M360.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void GcodeSuite::M360() {
180180
//
181181
config_line(F("NumExtruder"), EXTRUDERS);
182182
#if HAS_EXTRUDERS
183-
LOOP_L_N(e, EXTRUDERS) {
183+
EXTRUDER_LOOP() {
184184
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)));
185185
config_line_e(e, F("MaxSpeed"), planner.settings.max_feedrate_mm_s[E_AXIS_N(e)]);
186186
config_line_e(e, F("Acceleration"), planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(e)]);

Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_acceleration_screen.cpp

+15-16
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ void MaxAccelerationScreen::onRedraw(draw_mode_t what) {
4444
w.color(e_axis).adjuster( 8, F(STR_E0), getAxisMaxAcceleration_mm_s2(E0) );
4545
w.color(e_axis).adjuster(10, F(STR_E1), getAxisMaxAcceleration_mm_s2(E1) );
4646
#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
5151
#endif
5252
#endif
5353
w.increments();
@@ -65,19 +65,18 @@ bool MaxAccelerationScreen::onTouchHeld(uint8_t tag) {
6565
case 8: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E0); break;
6666
case 9: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E0); break;
6767
#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
7878
#endif
79-
default:
80-
return false;
79+
default: return false;
8180
}
8281
return true;
8382
}

Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/max_velocity_screen.cpp

+19-20
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ void MaxVelocityScreen::onRedraw(draw_mode_t what) {
4646
w.color(e_axis) .adjuster( 10, F(STR_E1), getAxisMaxFeedrate_mm_s(E1) );
4747
#if EXTRUDERS > 2
4848
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
5252
#endif
5353
#endif
5454
w.increments();
@@ -63,24 +63,23 @@ bool MaxVelocityScreen::onTouchHeld(uint8_t tag) {
6363
case 5: UI_INCREMENT(AxisMaxFeedrate_mm_s, Y); break;
6464
case 6: UI_DECREMENT(AxisMaxFeedrate_mm_s, Z); break;
6565
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
8181
#endif
82-
default:
83-
return false;
82+
default: return false;
8483
}
8584
SaveSettingsDialogBox::settingsChanged();
8685
return true;

Marlin/src/module/probe.h

+9
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,15 @@ class Probe {
188188
}
189189
#endif
190190

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+
*/
191200
static constexpr float _min_x(const xy_pos_t &probe_offset_xy=offset_xy) {
192201
return TERN(IS_KINEMATIC,
193202
(X_CENTER) - probe_radius(probe_offset_xy),

Marlin/src/pins/pinsDebug.h

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2020
*
2121
*/
22+
#pragma once
2223

2324
#include "../inc/MarlinConfig.h"
2425

0 commit comments

Comments
 (0)