From 6f7abab036ba3374da0169718b4ccde83fdec802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82?= Date: Wed, 1 Jun 2022 23:34:55 +0200 Subject: [PATCH] AP_WheelEncoder: fix WheelEncoder_Quadrature timestamp. Convert timestamp to ms from us. --- libraries/AP_WheelEncoder/WheelEncoder_Quadrature.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_WheelEncoder/WheelEncoder_Quadrature.cpp b/libraries/AP_WheelEncoder/WheelEncoder_Quadrature.cpp index 09c248342e..518bd26fd7 100644 --- a/libraries/AP_WheelEncoder/WheelEncoder_Quadrature.cpp +++ b/libraries/AP_WheelEncoder/WheelEncoder_Quadrature.cpp @@ -138,5 +138,5 @@ void AP_WheelEncoder_Quadrature::irq_handler(uint8_t pin, update_phase_and_error_count(); // record update time - irq_state.last_reading_ms = timestamp; + irq_state.last_reading_ms = timestamp * 1e-3f; }