mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 04:23:33 +08:00
Fix -Werror=implicit-fallthrough errors on GCC7
This commit is contained in:
committed by
Julian Oes
parent
ca480ff868
commit
06c6a0cdec
@@ -684,8 +684,8 @@ GPS::task_main()
|
|||||||
switch (_mode) {
|
switch (_mode) {
|
||||||
case GPS_DRIVER_MODE_NONE:
|
case GPS_DRIVER_MODE_NONE:
|
||||||
_mode = GPS_DRIVER_MODE_UBX;
|
_mode = GPS_DRIVER_MODE_UBX;
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
|
||||||
//no break
|
|
||||||
case GPS_DRIVER_MODE_UBX:
|
case GPS_DRIVER_MODE_UBX:
|
||||||
_helper = new GPSDriverUBX(_interface, &GPS::callback, this, &_report_gps_pos, _p_report_sat_info);
|
_helper = new GPSDriverUBX(_interface, &GPS::callback, this, &_report_gps_pos, _p_report_sat_info);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -718,8 +718,8 @@ PWMSim::pwm_ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
|||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
case PWM_SERVO_SET(0):
|
case PWM_SERVO_SET(0):
|
||||||
case PWM_SERVO_SET(1):
|
case PWM_SERVO_SET(1):
|
||||||
if (arg < 2100) {
|
if (arg < 2100) {
|
||||||
@@ -740,6 +740,7 @@ PWMSim::pwm_ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
|||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
|
||||||
case PWM_SERVO_GET(3):
|
case PWM_SERVO_GET(3):
|
||||||
case PWM_SERVO_GET(2):
|
case PWM_SERVO_GET(2):
|
||||||
@@ -747,8 +748,8 @@ PWMSim::pwm_ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
|||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
|
||||||
/* FALLTHROUGH */
|
|
||||||
case PWM_SERVO_GET(1):
|
case PWM_SERVO_GET(1):
|
||||||
case PWM_SERVO_GET(0): {
|
case PWM_SERVO_GET(0): {
|
||||||
*(servo_position_t *)arg = 1500;
|
*(servo_position_t *)arg = 1500;
|
||||||
|
|||||||
@@ -231,8 +231,8 @@ int InputMavlinkCmdMount::update_impl(unsigned int timeout_ms, ControlData **con
|
|||||||
switch ((int)vehicle_command.param7) {
|
switch ((int)vehicle_command.param7) {
|
||||||
case vehicle_command_s::VEHICLE_MOUNT_MODE_RETRACT:
|
case vehicle_command_s::VEHICLE_MOUNT_MODE_RETRACT:
|
||||||
_control_data.gimbal_shutter_retract = true;
|
_control_data.gimbal_shutter_retract = true;
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
|
||||||
//no break
|
|
||||||
case vehicle_command_s::VEHICLE_MOUNT_MODE_NEUTRAL:
|
case vehicle_command_s::VEHICLE_MOUNT_MODE_NEUTRAL:
|
||||||
_control_data.type = ControlData::Type::Neutral;
|
_control_data.type = ControlData::Type::Neutral;
|
||||||
|
|
||||||
@@ -306,4 +306,3 @@ void InputMavlinkCmdMount::print_status()
|
|||||||
|
|
||||||
|
|
||||||
} /* namespace vmount */
|
} /* namespace vmount */
|
||||||
|
|
||||||
|
|||||||
@@ -336,6 +336,7 @@ void FollowTarget::on_active()
|
|||||||
|
|
||||||
_follow_target_state = WAIT_FOR_TARGET_POSITION;
|
_follow_target_state = WAIT_FOR_TARGET_POSITION;
|
||||||
}
|
}
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
|
||||||
case WAIT_FOR_TARGET_POSITION: {
|
case WAIT_FOR_TARGET_POSITION: {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user