From 996b3b8b1e797d293bb4791195859566077fbca0 Mon Sep 17 00:00:00 2001 From: Josh Henderson Date: Sat, 11 Sep 2021 06:28:53 -0400 Subject: [PATCH] AC_Sprayer: use vector.xy().length() instead of norm(x,y) --- libraries/AC_Sprayer/AC_Sprayer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/AC_Sprayer/AC_Sprayer.cpp b/libraries/AC_Sprayer/AC_Sprayer.cpp index 9b678135b5..6c9a9ca2ff 100644 --- a/libraries/AC_Sprayer/AC_Sprayer.cpp +++ b/libraries/AC_Sprayer/AC_Sprayer.cpp @@ -132,7 +132,8 @@ void AC_Sprayer::update() // velocity will already be zero but this avoids a coverity warning velocity.zero(); } - float ground_speed = norm(velocity.x * 100.0f, velocity.y * 100.0f); + + float ground_speed = velocity.xy().length() * 100.0; // get the current time const uint32_t now = AP_HAL::millis();