Skip to content

Commit

Permalink
🎨 General cleanup, comments
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Mar 23, 2022
1 parent a80a303 commit 6b47db3
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 38 deletions.
1 change: 1 addition & 0 deletions Marlin/src/core/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ typedef IF<(NUM_AXIS_ENUMS > 8), uint16_t, uint8_t>::type axis_bits_t;
#define LOOP_LINEAR_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, LINEAR_AXES)
#define LOOP_LOGICAL_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, LOGICAL_AXES)
#define LOOP_DISTINCT_AXES(VAR) LOOP_S_L_N(VAR, X_AXIS, DISTINCT_AXES)
#define LOOP_DISTINCT_E(VAR) LOOP_L_N(VAR, DISTINCT_E)

//
// feedRate_t is just a humble float
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/gcode/host/M16.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "../gcode.h"
#include "../../MarlinCore.h"
#include "../../lcd/marlinui.h"

/**
* M16: Expected Printer Check
Expand All @@ -37,4 +38,4 @@ void GcodeSuite::M16() {

}

#endif
#endif // EXPECTED_PRINTER_CHECK
2 changes: 1 addition & 1 deletion Marlin/src/gcode/host/M360.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ void GcodeSuite::M360() {
//
config_line(F("NumExtruder"), EXTRUDERS);
#if HAS_EXTRUDERS
LOOP_L_N(e, EXTRUDERS) {
EXTRUDER_LOOP() {
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)));
config_line_e(e, F("MaxSpeed"), planner.settings.max_feedrate_mm_s[E_AXIS_N(e)]);
config_line_e(e, F("Acceleration"), planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(e)]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ void MaxAccelerationScreen::onRedraw(draw_mode_t what) {
w.color(e_axis).adjuster( 8, F(STR_E0), getAxisMaxAcceleration_mm_s2(E0) );
w.color(e_axis).adjuster(10, F(STR_E1), getAxisMaxAcceleration_mm_s2(E1) );
#if DISTINCT_E > 2
w.color(e_axis).adjuster(12, F(STR_E2), getAxisMaxAcceleration_mm_s2(E2) );
#endif
#if DISTINCT_E > 3
w.color(e_axis).adjuster(14, F(STR_E3), getAxisMaxAcceleration_mm_s2(E3) );
w.color(e_axis).adjuster(12, F(STR_E2), getAxisMaxAcceleration_mm_s2(E2) );
#if DISTINCT_E > 3
w.color(e_axis).adjuster(14, F(STR_E3), getAxisMaxAcceleration_mm_s2(E3) );
#endif
#endif
#endif
w.increments();
Expand All @@ -65,19 +65,18 @@ bool MaxAccelerationScreen::onTouchHeld(uint8_t tag) {
case 8: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E0); break;
case 9: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E0); break;
#if DISTINCT_E > 1
case 10: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E1); break;
case 11: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E1); break;
#endif
#if DISTINCT_E > 2
case 12: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E2); break;
case 13: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E2); break;
#endif
#if DISTINCT_E > 3
case 14: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E3); break;
case 15: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E3); break;
case 10: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E1); break;
case 11: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E1); break;
#if DISTINCT_E > 2
case 12: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E2); break;
case 13: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E2); break;
#if DISTINCT_E > 3
case 14: UI_DECREMENT(AxisMaxAcceleration_mm_s2, E3); break;
case 15: UI_INCREMENT(AxisMaxAcceleration_mm_s2, E3); break;
#endif
#endif
#endif
default:
return false;
default: return false;
}
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ void MaxVelocityScreen::onRedraw(draw_mode_t what) {
w.color(e_axis) .adjuster( 10, F(STR_E1), getAxisMaxFeedrate_mm_s(E1) );
#if EXTRUDERS > 2
w.color(e_axis).adjuster( 12, F(STR_E2), getAxisMaxFeedrate_mm_s(E2) );
#endif
#if EXTRUDERS > 3
w.color(e_axis).adjuster( 14, F(STR_E3), getAxisMaxFeedrate_mm_s(E3) );
#if EXTRUDERS > 3
w.color(e_axis).adjuster( 14, F(STR_E3), getAxisMaxFeedrate_mm_s(E3) );
#endif
#endif
#endif
w.increments();
Expand All @@ -63,24 +63,23 @@ bool MaxVelocityScreen::onTouchHeld(uint8_t tag) {
case 5: UI_INCREMENT(AxisMaxFeedrate_mm_s, Y); break;
case 6: UI_DECREMENT(AxisMaxFeedrate_mm_s, Z); break;
case 7: UI_INCREMENT(AxisMaxFeedrate_mm_s, Z); break;
#if DISTINCT_E > 0
case 8: UI_DECREMENT(AxisMaxFeedrate_mm_s, E0); break;
case 9: UI_INCREMENT(AxisMaxFeedrate_mm_s, E0); break;
#endif
#if DISTINCT_E > 1
case 10: UI_DECREMENT(AxisMaxFeedrate_mm_s, E1); break;
case 11: UI_INCREMENT(AxisMaxFeedrate_mm_s, E1); break;
#endif
#if DISTINCT_E > 2
case 12: UI_DECREMENT(AxisMaxFeedrate_mm_s, E2); break;
case 13: UI_INCREMENT(AxisMaxFeedrate_mm_s, E2); break;
#endif
#if DISTINCT_E > 3
case 14: UI_DECREMENT(AxisMaxFeedrate_mm_s, E3); break;
case 15: UI_INCREMENT(AxisMaxFeedrate_mm_s, E3); break;
#if DISTINCT_E
case 8: UI_DECREMENT(AxisMaxFeedrate_mm_s, E0); break;
case 9: UI_INCREMENT(AxisMaxFeedrate_mm_s, E0); break;
#if DISTINCT_E > 1
case 10: UI_DECREMENT(AxisMaxFeedrate_mm_s, E1); break;
case 11: UI_INCREMENT(AxisMaxFeedrate_mm_s, E1); break;
#if DISTINCT_E > 2
case 12: UI_DECREMENT(AxisMaxFeedrate_mm_s, E2); break;
case 13: UI_INCREMENT(AxisMaxFeedrate_mm_s, E2); break;
#if DISTINCT_E > 3
case 14: UI_DECREMENT(AxisMaxFeedrate_mm_s, E3); break;
case 15: UI_INCREMENT(AxisMaxFeedrate_mm_s, E3); break;
#endif
#endif
#endif
#endif
default:
return false;
default: return false;
}
SaveSettingsDialogBox::settingsChanged();
return true;
Expand Down
9 changes: 9 additions & 0 deletions Marlin/src/module/probe.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,15 @@ class Probe {
}
#endif

/**
* The nozzle is only able to move within the physical bounds of the machine.
* If the PROBE has an OFFSET Marlin may need to apply additional limits so
* the probe can be prevented from going to unreachable points.
*
* e.g., If the PROBE is to the LEFT of the NOZZLE, it will be limited in how
* close it can get the RIGHT edge of the bed (unless the nozzle is able move
* far enough past the right edge).
*/
static constexpr float _min_x(const xy_pos_t &probe_offset_xy=offset_xy) {
return TERN(IS_KINEMATIC,
(X_CENTER) - probe_radius(probe_offset_xy),
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/pins/pinsDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#pragma once

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

Expand Down

0 comments on commit 6b47db3

Please sign in to comment.