From 9e45792d241c1f3e444a25271442cd88f8b66d1a Mon Sep 17 00:00:00 2001 From: Michiel Cottaar <MichielCottaar@protonmail.com> Date: Tue, 30 Jul 2024 16:49:24 +0100 Subject: [PATCH] Fix computation of slew rate cost function for 3D trapezoid --- src/parts/trapezoids.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parts/trapezoids.jl b/src/parts/trapezoids.jl index ef33bbc..8a7eebb 100644 --- a/src/parts/trapezoids.jl +++ b/src/parts/trapezoids.jl @@ -74,7 +74,7 @@ function (::Type{Trapezoid})(; orientation=nothing, rise_time=nothing, flat_time get_free_variable.(slew_rate), group ) - add_cost_function!(-sum(abs(res.slew_rate))) + add_cost_function!(-sum(abs.(res.slew_rate))) else res = Trapezoid1D( get_free_variable(rise_time), -- GitLab