Skip to content
Snippets Groups Projects
Commit b818b07d authored by mtm-oss's avatar mtm-oss Committed by Daniel Agar
Browse files

mc_att_control: Failover in case of gyroscope failure (#11516)

parent 4e792b24
No related branches found
No related tags found
No related merge requests found
...@@ -837,6 +837,8 @@ MulticopterAttitudeControl::run() ...@@ -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() ...@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment