From f149b0c6072a13057cf59cdf07373928475ca929 Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Wed, 14 Sep 2022 01:15:51 +0200 Subject: [PATCH] =?UTF-8?q?Make=20Pulley::PlanMove=20always=5Finline=20aga?= =?UTF-8?q?in=E2=84=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This now saves 2 bytes ;) --- src/modules/pulley.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/modules/pulley.h b/src/modules/pulley.h index 0510f03..b2c2d2f 100644 --- a/src/modules/pulley.h +++ b/src/modules/pulley.h @@ -27,9 +27,7 @@ public: void PlanMove(mm::P_pos_t delta, mm::P_speed_t feed_rate, mm::P_speed_t end_rate = { 0 }); // NOTE: always_inline is required here to force gcc <= 7.x to evaluate each call at compile time - // But it increases the code size with gcc 7.x by ~200B when PlanMove is called with non-constant feed rates - // -> so we don't know yet how to avoid those stupid to/from float conversions (due to C++ unit system), but we'll find a way around ;) - void /*__attribute__((always_inline))*/ PlanMove(unit::U_mm delta, unit::U_mm_s feed_rate, unit::U_mm_s end_rate = { 0 }) { + void __attribute__((always_inline)) PlanMove(unit::U_mm delta, unit::U_mm_s feed_rate, unit::U_mm_s end_rate = { 0 }) { PlanMove(mm::unitToAxisUnit(delta), mm::unitToAxisUnit(feed_rate), mm::unitToAxisUnit(end_rate));