AC_Sprayer: use vector.xy().length() instead of norm(x,y)

This commit is contained in:
Josh Henderson 2021-09-11 06:28:53 -04:00 committed by Andrew Tridgell
parent c0b18e4d52
commit 996b3b8b1e
1 changed files with 2 additions and 1 deletions

View File

@ -132,7 +132,8 @@ void AC_Sprayer::update()
// velocity will already be zero but this avoids a coverity warning // velocity will already be zero but this avoids a coverity warning
velocity.zero(); 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 // get the current time
const uint32_t now = AP_HAL::millis(); const uint32_t now = AP_HAL::millis();