mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 20:13:33 +08:00
improve end to end control latency measurement (#9388)
This commit is contained in:
@@ -164,7 +164,6 @@ private:
|
||||
MultirotorMixer::saturation_status _saturation_status{};
|
||||
|
||||
perf_counter_t _loop_perf; /**< loop performance counter */
|
||||
perf_counter_t _controller_latency_perf;
|
||||
|
||||
math::LowPassFilter2p _lp_filters_d[3]; /**< low-pass filters for D-term (roll, pitch & yaw) */
|
||||
static constexpr const float initial_update_rate_hz = 250.f; /**< loop update rate used for initialization */
|
||||
|
||||
@@ -100,8 +100,6 @@ To reduce control latency, the module directly polls on the gyro topic published
|
||||
MulticopterAttitudeControl::MulticopterAttitudeControl() :
|
||||
ModuleParams(nullptr),
|
||||
_loop_perf(perf_alloc(PC_ELAPSED, "mc_att_control")),
|
||||
_controller_latency_perf(perf_alloc_once(PC_ELAPSED, "ctrl_latency")),
|
||||
|
||||
_lp_filters_d{
|
||||
{initial_update_rate_hz, 50.f},
|
||||
{initial_update_rate_hz, 50.f},
|
||||
@@ -757,7 +755,6 @@ MulticopterAttitudeControl::run()
|
||||
if (_actuators_0_pub != nullptr) {
|
||||
|
||||
orb_publish(_actuators_id, _actuators_0_pub, &_actuators);
|
||||
perf_end(_controller_latency_perf);
|
||||
|
||||
} else if (_actuators_id) {
|
||||
_actuators_0_pub = orb_advertise(_actuators_id, &_actuators);
|
||||
@@ -799,7 +796,6 @@ MulticopterAttitudeControl::run()
|
||||
if (_actuators_0_pub != nullptr) {
|
||||
|
||||
orb_publish(_actuators_id, _actuators_0_pub, &_actuators);
|
||||
perf_end(_controller_latency_perf);
|
||||
|
||||
} else if (_actuators_id) {
|
||||
_actuators_0_pub = orb_advertise(_actuators_id, &_actuators);
|
||||
|
||||
Reference in New Issue
Block a user