diff --git a/libraries/AP_RPM/AP_RPM.cpp b/libraries/AP_RPM/AP_RPM.cpp index 79a2646030914..087dcabe291d4 100644 --- a/libraries/AP_RPM/AP_RPM.cpp +++ b/libraries/AP_RPM/AP_RPM.cpp @@ -214,9 +214,7 @@ void AP_RPM::update(void) } #if HAL_LOGGING_ENABLED - if (enabled(0) || enabled(1)) { - Log_RPM(); - } + Log_RPM(); #endif } @@ -295,18 +293,23 @@ bool AP_RPM::arming_checks(size_t buflen, char *buffer) const #if HAL_LOGGING_ENABLED void AP_RPM::Log_RPM() const { - float rpm1 = -1, rpm2 = -1; - - get_rpm(0, rpm1); - get_rpm(1, rpm2); + // update logging for each instance + for (uint8_t i=0; i