diff --git a/sw/airborne/subsystems/navigation/OSAMNav.c b/sw/airborne/subsystems/navigation/OSAMNav.c index 0fa98b71be..11a2f27a5c 100644 --- a/sw/airborne/subsystems/navigation/OSAMNav.c +++ b/sw/airborne/subsystems/navigation/OSAMNav.c @@ -128,6 +128,8 @@ bool_t FlowerNav(void) } break; + default: + break; } return TRUE; } @@ -844,6 +846,8 @@ bool_t VerticalRaster(uint8_t l1, uint8_t l2, float radius, float AltSweep) { line_status = LR12; nav_init_stage(); } + default: + break; } return TRUE; /* This pattern never ends */ } diff --git a/sw/airborne/subsystems/navigation/discsurvey.c b/sw/airborne/subsystems/navigation/discsurvey.c index dc20e9a558..1a56f3b8f2 100644 --- a/sw/airborne/subsystems/navigation/discsurvey.c +++ b/sw/airborne/subsystems/navigation/discsurvey.c @@ -74,6 +74,8 @@ bool_t disc_survey( uint8_t center, float radius) { nav_init_stage(); } break; + default: + break; } NavVerticalAutoThrottleMode(0.); /* No pitch */ diff --git a/sw/airborne/subsystems/navigation/poly_survey_adv.c b/sw/airborne/subsystems/navigation/poly_survey_adv.c index 0edfc465b7..73f6e74852 100644 --- a/sw/airborne/subsystems/navigation/poly_survey_adv.c +++ b/sw/airborne/subsystems/navigation/poly_survey_adv.c @@ -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) { - float div, fac; + float divider, fac; - div = (((b2 - a2)*(y.x - x.x)) + ((x.y - y.y)*(b1 - a1))); - if (div == 0) return FALSE; - fac = ((y.x*(x.y - a2)) + (x.x*(a2 - y.y)) + (a1*(y.y - x.y))) / div; + divider = (((b2 - a2)*(y.x - x.x)) + ((x.y - y.y)*(b1 - a1))); + if (divider == 0) return FALSE; + 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 < 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; 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 >= 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.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 - if (div < 0.0) { + if (divider < 0.0) { for(i=1;i 0.0) { small.x = waypoints[poly_first+i].x; diff --git a/sw/airborne/subsystems/navigation/spiral.c b/sw/airborne/subsystems/navigation/spiral.c index e05b26df5e..f611843dd7 100644 --- a/sw/airborne/subsystems/navigation/spiral.c +++ b/sw/airborne/subsystems/navigation/spiral.c @@ -166,7 +166,8 @@ bool_t SpiralNav(void) } CSpiralStatus = Circle; break; - + default: + break; } return TRUE; }