Skip to content

Commit

Permalink
use axis type
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Aug 17, 2024
1 parent 0520b7e commit e440ca3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Marlin/src/module/ft_motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ int32_t FTMotion::stepperCmdBuff_produceIdx = 0, // Index of next stepper comman

bool FTMotion::sts_stepperBusy = false; // The stepper buffer has items and is in use.

millis_t FTMotion::axis_move_end_ti[NUM_AXES] = {0};
XYZEval<millis_t> FTMotion::axis_move_end_ti = { 0 };
AxisBits FTMotion::axis_move_dir;

// Private variables.
Expand Down Expand Up @@ -391,7 +391,7 @@ void FTMotion::reset() {

TERN_(HAS_EXTRUDERS, e_raw_z1 = e_advanced_z1 = 0.0f);

ZERO(axis_move_end_ti);
axis_move_end_ti.reset();
}

// Private functions.
Expand Down Expand Up @@ -558,7 +558,7 @@ void FTMotion::loadBlockData(block_t * const current_block) {
// Watch endstops until the move ends
const millis_t move_end_ti = millis() + SEC_TO_MS((FTM_TS) * float(max_intervals + num_samples_shaper_settle() + ((PROP_BATCHES) + 1) * (FTM_BATCH_SIZE)) + (float(FTM_STEPPERCMD_BUFF_SIZE) / float(FTM_STEPPER_FS)));

#define __SET_MOVE_END(A,V) do{ if (V) { axis_move_end_ti[_AXIS(A)] = move_end_ti; axis_move_dir[_AXIS(A)] = (V > 0); } }while(0);
#define __SET_MOVE_END(A,V) do{ if (V) { axis_move_end_ti.A = move_end_ti; axis_move_dir.A = (V > 0); } }while(0);
#define _SET_MOVE_END(A) __SET_MOVE_END(A, moveDist[_AXIS(A)])
#if CORE_IS_XY
__SET_MOVE_END(X, moveDist.x + moveDist.y);
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/module/ft_motion.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class FTMotion {

static bool sts_stepperBusy; // The stepper buffer has items and is in use.

static millis_t axis_move_end_ti[NUM_AXES];
static XYZEval<millis_t> axis_move_end_ti;
static AxisBits axis_move_dir;

// Public methods
Expand Down

0 comments on commit e440ca3

Please sign in to comment.