mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 23:49:00 +08:00
add missing default: entries in switch
This commit is contained in:
@@ -185,6 +185,7 @@ void v_ctl_altitude_loop( void ) {
|
||||
void v_ctl_climb_loop ( void ) {
|
||||
switch (v_ctl_climb_mode) {
|
||||
case V_CTL_CLIMB_MODE_AUTO_THROTTLE:
|
||||
default:
|
||||
v_ctl_climb_auto_throttle_loop();
|
||||
break;
|
||||
#ifdef V_CTL_AUTO_PITCH_PGAIN
|
||||
@@ -250,6 +251,7 @@ inline static void v_ctl_climb_auto_throttle_loop(void) {
|
||||
|
||||
case V_CTL_AUTO_THROTTLE_STANDARD:
|
||||
#endif
|
||||
default:
|
||||
f_throttle = controlled_throttle;
|
||||
v_ctl_auto_throttle_sum_err += err;
|
||||
BoundAbs(v_ctl_auto_throttle_sum_err, V_CTL_AUTO_THROTTLE_MAX_SUM_ERR);
|
||||
|
||||
@@ -558,6 +558,9 @@ void nav_eight(uint8_t target, uint8_t c1, float radius) {
|
||||
InitStage();
|
||||
}
|
||||
return;
|
||||
|
||||
default:/* Should not occur !!! Doing nothing */
|
||||
return;
|
||||
} /* switch */
|
||||
}
|
||||
|
||||
@@ -649,5 +652,8 @@ void nav_oval(uint8_t p1, uint8_t p2, float radius) {
|
||||
InitStage();
|
||||
}
|
||||
return;
|
||||
|
||||
default: /* Should not occur !!! Doing nothing */
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,6 +138,8 @@ bool_t nav_line(uint8_t l1, uint8_t l2, float radius) {
|
||||
line_status = LR12;
|
||||
nav_init_stage();
|
||||
}
|
||||
default: /* Should not occur !!! End the pattern */
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE; /* This pattern never ends */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user