From ae49c6516ab60ab7e72ad9c5b29af9973aee8c20 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 18 Aug 2022 18:09:31 +1000 Subject: [PATCH] Revert "AP_ESC_Telem: keep RPM updates in the correct order" This reverts commit db43b18829654629d9006ed5e7774f5c43751c33. reverted as it breaks non-contiguous motors for quadplanes --- libraries/AP_ESC_Telem/AP_ESC_Telem.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libraries/AP_ESC_Telem/AP_ESC_Telem.cpp b/libraries/AP_ESC_Telem/AP_ESC_Telem.cpp index 802df15ecb..9d68b67e89 100644 --- a/libraries/AP_ESC_Telem/AP_ESC_Telem.cpp +++ b/libraries/AP_ESC_Telem/AP_ESC_Telem.cpp @@ -67,10 +67,7 @@ uint8_t AP_ESC_Telem::get_motor_frequencies_hz(uint8_t nfreqs, float* freqs) con for (uint8_t i = 0; i < ESC_TELEM_MAX_ESCS && i < nfreqs; i++) { float rpm; if (get_rpm(i, rpm)) { - freqs[i] = rpm * (1.0f / 60.0f); - valid_escs++; - } else { - freqs[i] = 0.0f; + freqs[valid_escs++] = rpm * (1.0f / 60.0f); } }