From 0d71c4007794fc93ef1bb2ca4c884b36d73ea9b7 Mon Sep 17 00:00:00 2001 From: KarateBrot Date: Mon, 14 Jun 2021 01:08:24 +0200 Subject: [PATCH] Cleanup --- src/main/common/sdft.h | 2 -- src/main/flight/gyroanalyse.c | 4 ++-- src/main/flight/gyroanalyse.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/common/sdft.h b/src/main/common/sdft.h index f131c2d0d..35b1d435b 100644 --- a/src/main/common/sdft.h +++ b/src/main/common/sdft.h @@ -43,8 +43,6 @@ typedef struct sdft_s { } sdft_t; -STATIC_ASSERT(SDFT_SAMPLE_SIZE <= (uint8_t)-1, window_size_greater_than_underlying_type); - void sdftInit(sdft_t *sdft, const int startBin, const int endBin, const int numBatches); void sdftPush(sdft_t *sdft, const float sample); void sdftPushBatch(sdft_t *sdft, const float sample, const int batchIdx); diff --git a/src/main/flight/gyroanalyse.c b/src/main/flight/gyroanalyse.c index 69c322e1c..0ed47a34a 100644 --- a/src/main/flight/gyroanalyse.c +++ b/src/main/flight/gyroanalyse.c @@ -113,7 +113,7 @@ static float FAST_DATA_ZERO_INIT sdftMeanSq; static float FAST_DATA_ZERO_INIT dynNotchQ; static float FAST_DATA_ZERO_INIT dynNotchMinHz; static float FAST_DATA_ZERO_INIT dynNotchMaxHz; -static int FAST_DATA_ZERO_INIT dynNotchMaxFFT; +static uint16_t FAST_DATA_ZERO_INIT dynNotchMaxFFT; static float FAST_DATA_ZERO_INIT gain; static int FAST_DATA_ZERO_INIT numSamples; @@ -343,7 +343,7 @@ static FAST_CODE_NOINLINE void gyroDataAnalyseUpdate(gyroAnalyseState_t *state) } -int getMaxFFT(void) { +uint16_t getMaxFFT(void) { return dynNotchMaxFFT; } diff --git a/src/main/flight/gyroanalyse.h b/src/main/flight/gyroanalyse.h index 2fbd9251b..e6ab56144 100644 --- a/src/main/flight/gyroanalyse.h +++ b/src/main/flight/gyroanalyse.h @@ -49,5 +49,5 @@ typedef struct gyroAnalyseState_s { void gyroDataAnalyseInit(gyroAnalyseState_t *state, const uint32_t targetLooptimeUs); void gyroDataAnalysePush(gyroAnalyseState_t *state, const int axis, const float sample); void gyroDataAnalyse(gyroAnalyseState_t *state); -int getMaxFFT(void); +uint16_t getMaxFFT(void); void resetMaxFFT(void); -- 2.11.4.GIT