diff options
Diffstat (limited to 'apps/drivers/ms5611/ms5611.cpp')
-rw-r--r-- | apps/drivers/ms5611/ms5611.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/drivers/ms5611/ms5611.cpp b/apps/drivers/ms5611/ms5611.cpp index 30166828a..44014d969 100644 --- a/apps/drivers/ms5611/ms5611.cpp +++ b/apps/drivers/ms5611/ms5611.cpp @@ -144,6 +144,7 @@ private: orb_advert_t _baro_topic; perf_counter_t _sample_perf; + perf_counter_t _measure_perf; perf_counter_t _comms_errors; perf_counter_t _buffer_overflows; @@ -274,6 +275,7 @@ MS5611::MS5611(int bus) : _msl_pressure(101325), _baro_topic(-1), _sample_perf(perf_alloc(PC_ELAPSED, "ms5611_read")), + _measure_perf(perf_alloc(PC_ELAPSED, "ms5611_measure")), _comms_errors(perf_alloc(PC_COUNT, "ms5611_comms_errors")), _buffer_overflows(perf_alloc(PC_COUNT, "ms5611_buffer_overflows")) { @@ -647,6 +649,8 @@ MS5611::measure() { int ret; + perf_begin(_measure_perf); + /* * In phase zero, request temperature; in other phases, request pressure. */ @@ -664,6 +668,8 @@ MS5611::measure() if (OK != ret) perf_count(_comms_errors); + perf_end(_measure_perf); + return ret; } @@ -689,6 +695,7 @@ MS5611::collect() ret = transfer(&cmd, 1, &data[0], 3); if (ret != OK) { perf_count(_comms_errors); + perf_end(_sample_perf); return ret; } |