mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-10 09:21:35 +08:00
rate limit most parameter_update subscriptions
- parameter updates can be quite expensive because they trigger nearly all modules to reload all of their parameters immediately - limit modules from updating faster than once per second
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
#include <px4_platform_common/posix.h>
|
||||
#include <uORB/Publication.hpp>
|
||||
#include <uORB/Subscription.hpp>
|
||||
#include <uORB/SubscriptionInterval.hpp>
|
||||
#include <uORB/topics/actuator_outputs.h>
|
||||
#include <uORB/topics/differential_pressure.h>
|
||||
#include <uORB/topics/distance_sensor.h>
|
||||
@@ -200,7 +201,7 @@ private:
|
||||
uORB::PublicationMulti<distance_sensor_s> *_dist_pubs[RANGE_FINDER_MAX_SENSORS] {};
|
||||
uint8_t _dist_sensor_ids[RANGE_FINDER_MAX_SENSORS] {};
|
||||
|
||||
uORB::Subscription _parameter_update_sub{ORB_ID(parameter_update)};
|
||||
uORB::SubscriptionInterval _parameter_update_sub{ORB_ID(parameter_update), 1_s};
|
||||
|
||||
unsigned int _port{14560};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user