Skip to content

Commit

Permalink
set delta and current_position during setup and after homing
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndere1 committed Aug 11, 2024
1 parent 706af2b commit 6c3aeb1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Marlin/src/module/motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ xyz_pos_t cartes;

#if IS_KINEMATIC

abce_pos_t delta;
abce_pos_t delta = LOGICAL_AXIS_ARRAY(0, X_HOME_POS, Y_HOME_POS, Z_INIT_POS, I_HOME_POS, J_HOME_POS, K_HOME_POS, U_HOME_POS, V_HOME_POS, W_HOME_POS);

#if HAS_SCARA_OFFSET
abc_pos_t scara_home_offset;
Expand Down Expand Up @@ -2700,6 +2700,10 @@ void set_axis_is_at_home(const AxisEnum axis) {
current_position[axis] = (axis == Z_AXIS) ? DIFF_TERN(HAS_BED_PROBE, delta_height, probe.offset.z) : base_home_pos(axis);
#else
current_position[axis] = base_home_pos(axis);
#if ANY(PENTA_AXIS_TRT, PENTA_AXIS_HT)
// TODO (DerAndere): Introduce a function like scara_set_axis_is_at_home.
delta[axis] = current_position[axis];
#endif
#endif

/**
Expand Down

0 comments on commit 6c3aeb1

Please sign in to comment.