From 8842a7dc1befe452379c762d40e914ea5a78b72e Mon Sep 17 00:00:00 2001 From: Jason Short Date: Sun, 21 Oct 2012 14:36:05 -0700 Subject: [PATCH] ACM : Cast to int32_T Don't think it really needs it, but I feel better with the cast. --- ArduCopter/navigation.pde | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduCopter/navigation.pde b/ArduCopter/navigation.pde index b1c12ec0b5..14b58276db 100644 --- a/ArduCopter/navigation.pde +++ b/ArduCopter/navigation.pde @@ -246,7 +246,7 @@ static int16_t get_desired_speed(int16_t max_speed) }else{ if(wp_distance < 15000){ // go slower - int32_t temp = 2 * 100 * (wp_distance - g.waypoint_radius * 100); + int32_t temp = 2 * 100 * (int32_t)(wp_distance - g.waypoint_radius * 100); max_speed = sqrt((float)temp); max_speed = min(max_speed, g.waypoint_speed_max); }