mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-19 02:00:34 +08:00
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:
@@ -80,7 +80,6 @@
|
||||
Airspeed::Airspeed(int bus, int address, unsigned conversion_interval, const char *path) :
|
||||
I2C("Airspeed", path, bus, address, 100000),
|
||||
_reports(nullptr),
|
||||
_buffer_overflows(perf_alloc(PC_COUNT, "aspd_buf_of")),
|
||||
_max_differential_pressure_pa(0),
|
||||
_sensor_ok(false),
|
||||
_last_published_sensor_ok(true), /* initialize differently to force publication */
|
||||
@@ -118,7 +117,6 @@ Airspeed::~Airspeed()
|
||||
// free perf counters
|
||||
perf_free(_sample_perf);
|
||||
perf_free(_comms_errors);
|
||||
perf_free(_buffer_overflows);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -409,7 +407,6 @@ Airspeed::print_info()
|
||||
{
|
||||
perf_print_counter(_sample_perf);
|
||||
perf_print_counter(_comms_errors);
|
||||
perf_print_counter(_buffer_overflows);
|
||||
warnx("poll interval: %u ticks", _measure_ticks);
|
||||
_reports->print_info("report queue");
|
||||
}
|
||||
@@ -417,7 +414,5 @@ Airspeed::print_info()
|
||||
void
|
||||
Airspeed::new_report(const differential_pressure_s &report)
|
||||
{
|
||||
if (!_reports->force(&report)) {
|
||||
perf_count(_buffer_overflows);
|
||||
}
|
||||
_reports->force(&report);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user