mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 21:55:34 +08:00
lib/system_identification/signal_generator: change functions to inline functions for optimization
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
namespace signal_generator
|
||||
{
|
||||
|
||||
float getLinearSineSweep(float f_start, float f_end, float duration, float t)
|
||||
inline float getLinearSineSweep(float f_start, float f_end, float duration, float t)
|
||||
{
|
||||
if (t > duration) {
|
||||
return 0.f;
|
||||
@@ -52,7 +52,7 @@ float getLinearSineSweep(float f_start, float f_end, float duration, float t)
|
||||
return sinf(w_start * t + 0.5f * (w_end - w_start) * t * t / duration);
|
||||
}
|
||||
|
||||
float getLogSineSweep(float f_start, float f_end, float duration, float t)
|
||||
inline float getLogSineSweep(float f_start, float f_end, float duration, float t)
|
||||
{
|
||||
if (t > duration) {
|
||||
return 0.f;
|
||||
|
||||
Reference in New Issue
Block a user