mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 17:06:31 +08:00
Clean STM32 compile warnings
This commit is contained in:
@@ -128,6 +128,8 @@ bool_t FlowerNav(void)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -844,6 +846,8 @@ bool_t VerticalRaster(uint8_t l1, uint8_t l2, float radius, float AltSweep) {
|
|||||||
line_status = LR12;
|
line_status = LR12;
|
||||||
nav_init_stage();
|
nav_init_stage();
|
||||||
}
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return TRUE; /* This pattern never ends */
|
return TRUE; /* This pattern never ends */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,6 +74,8 @@ bool_t disc_survey( uint8_t center, float radius) {
|
|||||||
nav_init_stage();
|
nav_init_stage();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
NavVerticalAutoThrottleMode(0.); /* No pitch */
|
NavVerticalAutoThrottleMode(0.); /* No pitch */
|
||||||
|
|||||||
@@ -85,11 +85,11 @@ static void nav_points(point2d start, point2d end)
|
|||||||
**/
|
**/
|
||||||
static bool_t intercept_two_lines(point2d *p, point2d x, point2d y, float a1, float a2, float b1, float b2)
|
static bool_t intercept_two_lines(point2d *p, point2d x, point2d y, float a1, float a2, float b1, float b2)
|
||||||
{
|
{
|
||||||
float div, fac;
|
float divider, fac;
|
||||||
|
|
||||||
div = (((b2 - a2)*(y.x - x.x)) + ((x.y - y.y)*(b1 - a1)));
|
divider = (((b2 - a2)*(y.x - x.x)) + ((x.y - y.y)*(b1 - a1)));
|
||||||
if (div == 0) return FALSE;
|
if (divider == 0) return FALSE;
|
||||||
fac = ((y.x*(x.y - a2)) + (x.x*(a2 - y.y)) + (a1*(y.y - x.y))) / div;
|
fac = ((y.x*(x.y - a2)) + (x.x*(a2 - y.y)) + (a1*(y.y - x.y))) / divider;
|
||||||
if (fac > 1.0) return FALSE;
|
if (fac > 1.0) return FALSE;
|
||||||
if (fac < 0.0) return FALSE;
|
if (fac < 0.0) return FALSE;
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ bool_t init_poly_survey_adv(uint8_t first_wp, uint8_t size, float angle, float s
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
point2d small, sweep;
|
point2d small, sweep;
|
||||||
float div, len, angle_rad = angle/180.0*M_PI;
|
float divider, len, angle_rad = angle/180.0*M_PI;
|
||||||
|
|
||||||
if (angle < 0.0) angle += 360.0;
|
if (angle < 0.0) angle += 360.0;
|
||||||
if (angle >= 360.0) angle -= 360.0;
|
if (angle >= 360.0) angle -= 360.0;
|
||||||
@@ -224,10 +224,10 @@ bool_t init_poly_survey_adv(uint8_t first_wp, uint8_t size, float angle, float s
|
|||||||
small.x = waypoints[poly_first].x;
|
small.x = waypoints[poly_first].x;
|
||||||
small.y = waypoints[poly_first].y;
|
small.y = waypoints[poly_first].y;
|
||||||
|
|
||||||
div = (sweep_vec.y*dir_vec.x) - (sweep_vec.x*dir_vec.y);
|
divider = (sweep_vec.y*dir_vec.x) - (sweep_vec.x*dir_vec.y);
|
||||||
|
|
||||||
//cacluate the leftmost point if one sees the dir vec as going "up" and the sweep vec as going right
|
//cacluate the leftmost point if one sees the dir vec as going "up" and the sweep vec as going right
|
||||||
if (div < 0.0) {
|
if (divider < 0.0) {
|
||||||
for(i=1;i<poly_count;i++)
|
for(i=1;i<poly_count;i++)
|
||||||
if ((dir_vec.x*(waypoints[poly_first+i].y - small.y)) + (dir_vec.y*(small.x - waypoints[poly_first+i].x)) > 0.0) {
|
if ((dir_vec.x*(waypoints[poly_first+i].y - small.y)) + (dir_vec.y*(small.x - waypoints[poly_first+i].x)) > 0.0) {
|
||||||
small.x = waypoints[poly_first+i].x;
|
small.x = waypoints[poly_first+i].x;
|
||||||
|
|||||||
@@ -166,7 +166,8 @@ bool_t SpiralNav(void)
|
|||||||
}
|
}
|
||||||
CSpiralStatus = Circle;
|
CSpiralStatus = Circle;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user