mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 20:33:35 +08:00
mc_att_control: Failover in case of gyroscope failure (#11516)
Problem description at: http://discuss.px4.io/t/multicopter-lock-if-primary-gyro-fails/9685
This commit is contained in:
@@ -837,6 +837,8 @@ MulticopterAttitudeControl::run()
|
|||||||
|
|
||||||
while (!should_exit()) {
|
while (!should_exit()) {
|
||||||
|
|
||||||
|
// check if the selected gyro has updated first
|
||||||
|
sensor_correction_poll();
|
||||||
poll_fds.fd = _sensor_gyro_sub[_selected_gyro];
|
poll_fds.fd = _sensor_gyro_sub[_selected_gyro];
|
||||||
|
|
||||||
/* wait for up to 100ms for data */
|
/* wait for up to 100ms for data */
|
||||||
@@ -887,7 +889,6 @@ MulticopterAttitudeControl::run()
|
|||||||
vehicle_status_poll();
|
vehicle_status_poll();
|
||||||
vehicle_motor_limits_poll();
|
vehicle_motor_limits_poll();
|
||||||
battery_status_poll();
|
battery_status_poll();
|
||||||
sensor_correction_poll();
|
|
||||||
sensor_bias_poll();
|
sensor_bias_poll();
|
||||||
vehicle_land_detected_poll();
|
vehicle_land_detected_poll();
|
||||||
landing_gear_state_poll();
|
landing_gear_state_poll();
|
||||||
|
|||||||
Reference in New Issue
Block a user