drivers: remove the overflow perf counter

This was used together with the read() interface, but we don't use that
so the counters are wrong.
This commit is contained in:
Beat Küng
2017-03-20 09:11:34 +01:00
committed by Lorenz Meier
parent f60dfbbb40
commit 546bd2b4d0
23 changed files with 26 additions and 140 deletions
+2 -8
View File
@@ -130,7 +130,6 @@ private:
perf_counter_t _sample_perf;
perf_counter_t _comms_errors;
perf_counter_t _buffer_overflows;
/**
* Test whether the device supported by the driver is present at a
@@ -238,8 +237,7 @@ TRONE::TRONE(int bus, int address) :
_orb_class_instance(-1),
_distance_sensor_topic(nullptr),
_sample_perf(perf_alloc(PC_ELAPSED, "tr1_read")),
_comms_errors(perf_alloc(PC_COUNT, "tr1_com_err")),
_buffer_overflows(perf_alloc(PC_COUNT, "tr1_buf_of"))
_comms_errors(perf_alloc(PC_COUNT, "tr1_com_err"))
{
// up the retries since the device misses the first measure attempts
I2C::_retries = 3;
@@ -268,7 +266,6 @@ TRONE::~TRONE()
// free perf counters
perf_free(_sample_perf);
perf_free(_comms_errors);
perf_free(_buffer_overflows);
}
int
@@ -599,9 +596,7 @@ TRONE::collect()
orb_publish(ORB_ID(distance_sensor), _distance_sensor_topic, &report);
}
if (_reports->force(&report)) {
perf_count(_buffer_overflows);
}
_reports->force(&report);
/* notify anyone waiting for data */
poll_notify(POLLIN);
@@ -706,7 +701,6 @@ TRONE::print_info()
{
perf_print_counter(_sample_perf);
perf_print_counter(_comms_errors);
perf_print_counter(_buffer_overflows);
printf("poll interval: %u ticks\n", _measure_ticks);
_reports->print_info("report queue");
}