🎨 General cleanup, comments

This commit is contained in:
Scott Lahteine 2022-03-22 20:34:00 -05:00 committed by Scott Lahteine
parent 4a8b99d505
commit 9ac1c73041
7 changed files with 48 additions and 38 deletions

View file

@ -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

View file

@ -26,6 +26,7 @@
#include "../gcode.h"
#include "../../MarlinCore.h"
#include "../../lcd/marlinui.h"
/**
* M16: Expected Printer Check
@ -37,4 +38,4 @@ void GcodeSuite::M16() {
}
#endif
#endif // EXPECTED_PRINTER_CHECK

View file

@ -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)]);

View file

@ -45,11 +45,11 @@ void MaxAccelerationScreen::onRedraw(draw_mode_t what) {
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) );
#endif
#endif
#endif
w.increments();
}
@ -67,17 +67,16 @@ bool MaxAccelerationScreen::onTouchHeld(uint8_t tag) {
#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;
#endif
default:
return false;
#endif
#endif
default: return false;
}
return true;
}

View file

@ -46,11 +46,11 @@ 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) );
#endif
#endif
#endif
w.increments();
}
@ -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
#if DISTINCT_E
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;
#endif
default:
return false;
#endif
#endif
#endif
default: return false;
}
SaveSettingsDialogBox::settingsChanged();
return true;

View file

@ -188,6 +188,15 @@ public:
}
#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),

View file

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