File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/modules/mc_att_control Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -613,6 +613,14 @@ MulticopterAttitudeControl::run()
613613}
614614
615615_sensor_correction_sub = orb_subscribe (ORB_ID (sensor_correction));
616+
617+ // sensor correction topic is not being published regularly and we might have missed the first update.
618+ // so copy it once initially so that we have the latest data. In future this will not be needed anymore as the
619+ // behavior of the orb_check function will change
620+ if (_sensor_correction_sub > 0 ) {
621+ orb_copy (ORB_ID (sensor_correction), _sensor_correction_sub, &_sensor_correction);
622+ }
623+
616624_sensor_bias_sub = orb_subscribe (ORB_ID (sensor_bias));
617625
618626/* wakeup source: gyro data from sensor selected by the sensor app */
You can’t perform that action at this time.
0 commit comments