From 202f424aede4d3c2bd1ce21f4a125b2569f7ad03 Mon Sep 17 00:00:00 2001 From: Pedro-Roque Date: Wed, 5 Feb 2025 16:36:37 +0100 Subject: [PATCH] rft: remove commented section --- .../functions/FunctionThrusters.hpp | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/src/lib/mixer_module/functions/FunctionThrusters.hpp b/src/lib/mixer_module/functions/FunctionThrusters.hpp index 61449c021f..4609d2d77e 100644 --- a/src/lib/mixer_module/functions/FunctionThrusters.hpp +++ b/src/lib/mixer_module/functions/FunctionThrusters.hpp @@ -75,44 +75,7 @@ public: static inline void updateValues(uint32_t reversible, float thrust_factor, float *values, int num_values) { - // TODO(@Pedro-Roque): for now bypass this - /*if (thrust_factor > 0.f && thrust_factor <= 1.f) { - // thrust factor - // rel_thrust = factor * x^2 + (1-factor) * x, - const float a = thrust_factor; - const float b = (1.f - thrust_factor); - - // don't recompute for all values (ax^2+bx+c=0) - const float tmp1 = b / (2.f * a); - const float tmp2 = b * b / (4.f * a * a); - - for (int i = 0; i < num_values; ++i) { - float control = values[i]; - - if (control > 0.f) { - values[i] = -tmp1 + sqrtf(tmp2 + (control / a)); - - } else if (control < -0.f) { - values[i] = tmp1 - sqrtf(tmp2 - (control / a)); - - } else { - values[i] = 0.f; - } - } - } - - for (int i = 0; i < num_values; ++i) { - if ((reversible & (1u << i)) == 0) { - if (values[i] < -FLT_EPSILON) { - values[i] = NAN; - - } else { - // remap from [0, 1] to [-1, 1] - values[i] = values[i] * 2.f - 1.f; - } - } - }*/ } bool reversible(OutputFunction func) const override { return false; }