🎨 Misc cleanup and fixes
This commit is contained in:
committed by
Scott Lahteine
parent
c85633b47f
commit
f7d28ce1d6
@ -508,7 +508,7 @@ void Endstops::update() {
|
||||
#define UPDATE_ENDSTOP_BIT(AXIS, MINMAX) SET_BIT_TO(live_state, _ENDSTOP(AXIS, MINMAX), (READ(_ENDSTOP_PIN(AXIS, MINMAX)) != _ENDSTOP_INVERTING(AXIS, MINMAX)))
|
||||
#define COPY_LIVE_STATE(SRC_BIT, DST_BIT) SET_BIT_TO(live_state, DST_BIT, TEST(live_state, SRC_BIT))
|
||||
|
||||
#if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY)
|
||||
#if BOTH(G38_PROBE_TARGET, HAS_Z_MIN_PROBE_PIN) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY)
|
||||
// If G38 command is active check Z_MIN_PROBE for ALL movement
|
||||
if (G38_move) UPDATE_ENDSTOP_BIT(Z, MIN_PROBE);
|
||||
#endif
|
||||
@ -747,7 +747,7 @@ void Endstops::update() {
|
||||
#define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_DUAL_ENDSTOP(Z, MINMAX)
|
||||
#endif
|
||||
|
||||
#if ENABLED(G38_PROBE_TARGET) && PIN_EXISTS(Z_MIN_PROBE) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY)
|
||||
#if BOTH(G38_PROBE_TARGET, HAS_Z_MIN_PROBE_PIN) && NONE(CORE_IS_XY, CORE_IS_XZ, MARKFORGED_XY)
|
||||
#if ENABLED(G38_PROBE_AWAY)
|
||||
#define _G38_OPEN_STATE (G38_move >= 4)
|
||||
#else
|
||||
|
@ -83,13 +83,13 @@ bool relative_mode; // = false;
|
||||
* Used by 'line_to_current_position' to do a move after changing it.
|
||||
* Used by 'sync_plan_position' to update 'planner.position'.
|
||||
*/
|
||||
xyze_pos_t current_position = { X_HOME_POS, Y_HOME_POS,
|
||||
#ifdef Z_IDLE_HEIGHT
|
||||
Z_IDLE_HEIGHT
|
||||
#else
|
||||
Z_HOME_POS
|
||||
#endif
|
||||
};
|
||||
#ifdef Z_IDLE_HEIGHT
|
||||
#define Z_INIT_POS Z_IDLE_HEIGHT
|
||||
#else
|
||||
#define Z_INIT_POS Z_HOME_POS
|
||||
#endif
|
||||
|
||||
xyze_pos_t current_position = { X_HOME_POS, Y_HOME_POS, Z_INIT_POS };
|
||||
|
||||
/**
|
||||
* Cartesian Destination
|
||||
@ -204,11 +204,7 @@ void report_real_position() {
|
||||
get_cartesian_from_steppers();
|
||||
xyze_pos_t npos = cartes;
|
||||
npos.e = planner.get_axis_position_mm(E_AXIS);
|
||||
|
||||
#if HAS_POSITION_MODIFIERS
|
||||
planner.unapply_modifiers(npos, true);
|
||||
#endif
|
||||
|
||||
TERN_(HAS_POSITION_MODIFIERS, planner.unapply_modifiers(npos, true));
|
||||
report_logical_position(npos);
|
||||
report_more_positions();
|
||||
}
|
||||
|
@ -2584,8 +2584,8 @@ void MarlinSettings::postprocess() {
|
||||
void MarlinSettings::reset() {
|
||||
LOOP_XYZE_N(i) {
|
||||
planner.settings.max_acceleration_mm_per_s2[i] = pgm_read_dword(&_DMA[ALIM(i, _DMA)]);
|
||||
planner.settings.axis_steps_per_mm[i] = pgm_read_float(&_DASU[ALIM(i, _DASU)]);
|
||||
planner.settings.max_feedrate_mm_s[i] = pgm_read_float(&_DMF[ALIM(i, _DMF)]);
|
||||
planner.settings.axis_steps_per_mm[i] = pgm_read_float(&_DASU[ALIM(i, _DASU)]);
|
||||
planner.settings.max_feedrate_mm_s[i] = pgm_read_float(&_DMF[ALIM(i, _DMF)]);
|
||||
}
|
||||
|
||||
planner.settings.min_segment_time_us = DEFAULT_MINSEGMENTTIME;
|
||||
|
@ -62,7 +62,7 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E };
|
||||
#define _TMC_UART_DEFINE(SWHW, IC, ST, AI) TMC_UART_##SWHW##_DEFINE(IC, ST, TMC_##ST##_LABEL, AI)
|
||||
#define TMC_UART_DEFINE(SWHW, ST, AI) _TMC_UART_DEFINE(SWHW, ST##_DRIVER_TYPE, ST, AI##_AXIS)
|
||||
|
||||
#if DISTINCT_E > 1
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
#define TMC_SPI_DEFINE_E(AI) TMC_SPI_DEFINE(E##AI, E##AI)
|
||||
#define TMC_UART_DEFINE_E(SWHW, AI) TMC_UART_DEFINE(SWHW, E##AI, E##AI)
|
||||
#else
|
||||
|
Reference in New Issue
Block a user