mc_pos_control limit to 50 Hz

This commit is contained in:
Daniel Agar 2019-03-13 10:50:13 -04:00
parent f3533d31f8
commit 1083af21e8
1 changed files with 3 additions and 1 deletions

View File

@ -582,11 +582,13 @@ MulticopterPositionControl::run()
_vehicle_land_detected_sub = orb_subscribe(ORB_ID(vehicle_land_detected));
_control_mode_sub = orb_subscribe(ORB_ID(vehicle_control_mode));
_params_sub = orb_subscribe(ORB_ID(parameter_update));
_local_pos_sub = orb_subscribe(ORB_ID(vehicle_local_position));
_att_sub = orb_subscribe(ORB_ID(vehicle_attitude));
_home_pos_sub = orb_subscribe(ORB_ID(home_position));
_traj_wp_avoidance_sub = orb_subscribe(ORB_ID(vehicle_trajectory_waypoint));
_local_pos_sub = orb_subscribe(ORB_ID(vehicle_local_position));
orb_set_interval(_local_pos_sub, 20); // 50 Hz updates
// get initial values for all parameters and subscribtions
parameters_update(true);
poll_subscriptions();