mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
ACM : Cast to int32_T
Don't think it really needs it, but I feel better with the cast.
This commit is contained in:
parent
96f0a32cd3
commit
97d3134ff0
@ -246,7 +246,7 @@ static int16_t get_desired_speed(int16_t max_speed)
|
|||||||
}else{
|
}else{
|
||||||
if(wp_distance < 15000){
|
if(wp_distance < 15000){
|
||||||
// go slower
|
// 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 = sqrt((float)temp);
|
||||||
max_speed = min(max_speed, g.waypoint_speed_max);
|
max_speed = min(max_speed, g.waypoint_speed_max);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user