From 705e4563db075ab5a9fa864c1359e43e40d3b430 Mon Sep 17 00:00:00 2001 From: wurstnase Date: Thu, 30 Jun 2016 08:45:49 +0200 Subject: [PATCH] DDA: X is not critical anymore. It's prepared here: https://github.com/Traumflug/Teacup_Firmware/commit/294f0eda26 And gone here: https://github.com/Traumflug/Teacup_Firmware/commit/4f0a00c1a Anyhow, we have a calculation with X in dda_lookahead.c Traumflugs review note: true, at least until we get distinct acceleration on each axis. --- dda.c | 1 - dda_lookahead.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/dda.c b/dda.c index fd4b806..93e56eb 100644 --- a/dda.c +++ b/dda.c @@ -392,7 +392,6 @@ void dda_create(DDA *dda, TARGET *target) { else dda->accel = 0; #elif defined ACCELERATION_RAMPING - // yes, this assumes always the x axis as the critical one regarding acceleration. If we want to implement per-axis acceleration, things get tricky ... dda->c_min = move_duration / target->F; if (dda->c_min < c_limit) { dda->c_min = c_limit; diff --git a/dda_lookahead.c b/dda_lookahead.c index f8df93e..76fab02 100644 --- a/dda_lookahead.c +++ b/dda_lookahead.c @@ -216,6 +216,7 @@ void dda_join_moves(DDA *prev, DDA *current) { this_F = muldiv(current->fast_um, current->endpoint.F, current->distance); crossF = muldiv(current->fast_um, crossF, current->distance); + // TODO: calculate the steps from the fastest axis and not from X. prev_F_in_steps = ACCELERATE_RAMP_LEN(prev_F); this_F_in_steps = ACCELERATE_RAMP_LEN(this_F); crossF_in_steps = ACCELERATE_RAMP_LEN(crossF);