fix(ci): clang-tidy bugprone-too-small-loop-variable(#26709)

This commit is contained in:
Ege Kural
2026-03-11 08:18:53 -07:00
committed by GitHub
parent a2808a991c
commit d72d99f2d8
7 changed files with 28 additions and 29 deletions
+2 -2
View File
@@ -439,14 +439,14 @@ void GyroFFT::FindPeaks(const hrt_abstime &timestamp_sample, int axis, q15_t *ff
float bin_mag_sum = 0;
// FFT output buffer is ordered [real[0], imag[0], real[1], imag[1], real[2], imag[2] ... real[(N/2)-1], imag[(N/2)-1]
for (uint16_t fft_index = 2; fft_index < _imu_gyro_fft_len; fft_index += 2) {
for (size_t fft_index = 2; fft_index < static_cast<size_t>(_imu_gyro_fft_len); fft_index += 2) {
const float real = fft_outupt_buffer[fft_index];
const float imag = fft_outupt_buffer[fft_index + 1];
const float fft_magnitude = sqrtf(real * real + imag * imag);
int bin_index = fft_index / 2;
size_t bin_index = fft_index / 2;
_peak_magnitudes_all[bin_index] = fft_magnitude;
bin_mag_sum += fft_magnitude;