diff options
-rw-r--r-- | src/drivers/px4io/px4io.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 58390ba4c..ed9487cf9 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -263,6 +263,7 @@ private: perf_counter_t _perf_update; ///<local performance counter for status updates perf_counter_t _perf_write; ///<local performance counter for PWM control writes perf_counter_t _perf_chan_count; ///<local performance counter for channel number changes + perf_counter_t _perf_system_latency; ///< total system latency /* cached IO state */ uint16_t _status; ///< Various IO status flags @@ -494,6 +495,7 @@ PX4IO::PX4IO(device::Device *interface) : _perf_update(perf_alloc(PC_ELAPSED, "io update")), _perf_write(perf_alloc(PC_ELAPSED, "io write")), _perf_chan_count(perf_alloc(PC_COUNT, "io rc #")), + _perf_system_latency(perf_alloc_once(PC_ELAPSED, "sys_latency")), _status(0), _alarms(0), _t_actuator_controls_0(-1), @@ -1086,6 +1088,7 @@ int PX4IO::io_set_control_groups() { int ret = io_set_control_state(0); + perf_end(_perf_system_latency); /* send auxiliary control groups */ (void)io_set_control_state(1); |