mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 05:43:35 +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:
@@ -74,7 +74,6 @@
|
||||
AirspeedSim::AirspeedSim(int bus, int address, unsigned conversion_interval, const char *path) :
|
||||
VDev("AIRSPEEDSIM", path),
|
||||
_reports(nullptr),
|
||||
_buffer_overflows(perf_alloc(PC_COUNT, "airspeed_buffer_overflows")),
|
||||
_retries(0),
|
||||
_max_differential_pressure_pa(0),
|
||||
_sensor_ok(false),
|
||||
@@ -113,7 +112,6 @@ AirspeedSim::~AirspeedSim()
|
||||
// free perf counters
|
||||
perf_free(_sample_perf);
|
||||
perf_free(_comms_errors);
|
||||
perf_free(_buffer_overflows);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -405,7 +403,6 @@ AirspeedSim::print_info()
|
||||
{
|
||||
perf_print_counter(_sample_perf);
|
||||
perf_print_counter(_comms_errors);
|
||||
perf_print_counter(_buffer_overflows);
|
||||
PX4_INFO("poll interval: %u ticks", _measure_ticks);
|
||||
_reports->print_info("report queue");
|
||||
}
|
||||
@@ -413,9 +410,7 @@ AirspeedSim::print_info()
|
||||
void
|
||||
AirspeedSim::new_report(const differential_pressure_s &report)
|
||||
{
|
||||
if (!_reports->force(&report)) {
|
||||
perf_count(_buffer_overflows);
|
||||
}
|
||||
_reports->force(&report);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -438,4 +433,4 @@ AirspeedSim::transfer(const uint8_t *send, unsigned send_len, uint8_t *recv, uns
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,6 @@ public:
|
||||
|
||||
private:
|
||||
ringbuffer::RingBuffer *_reports;
|
||||
perf_counter_t _buffer_overflows;
|
||||
|
||||
unsigned _retries; // XXX this should come from the SIM class
|
||||
|
||||
|
||||
@@ -122,7 +122,6 @@ protected:
|
||||
perf_counter_t _sample_perf;
|
||||
perf_counter_t _measure_perf;
|
||||
perf_counter_t _comms_errors;
|
||||
perf_counter_t _buffer_overflows;
|
||||
|
||||
/**
|
||||
* Initialize the automatic measurement state machine and start it.
|
||||
@@ -203,8 +202,7 @@ BAROSIM::BAROSIM(const char *path) :
|
||||
_orb_class_instance(-1),
|
||||
_sample_perf(perf_alloc(PC_ELAPSED, "barosim_read")),
|
||||
_measure_perf(perf_alloc(PC_ELAPSED, "barosim_measure")),
|
||||
_comms_errors(perf_alloc(PC_COUNT, "barosim_comms_errors")),
|
||||
_buffer_overflows(perf_alloc(PC_COUNT, "barosim_buffer_overflows"))
|
||||
_comms_errors(perf_alloc(PC_COUNT, "barosim_comms_errors"))
|
||||
{
|
||||
|
||||
}
|
||||
@@ -223,7 +221,6 @@ BAROSIM::~BAROSIM()
|
||||
perf_free(_sample_perf);
|
||||
perf_free(_measure_perf);
|
||||
perf_free(_comms_errors);
|
||||
perf_free(_buffer_overflows);
|
||||
|
||||
}
|
||||
|
||||
@@ -694,9 +691,7 @@ BAROSIM::collect()
|
||||
}
|
||||
}
|
||||
|
||||
if (_reports->force(&report)) {
|
||||
perf_count(_buffer_overflows);
|
||||
}
|
||||
_reports->force(&report);
|
||||
|
||||
/* notify anyone waiting for data */
|
||||
//DevMgr::updateNotify(*this);
|
||||
@@ -716,7 +711,6 @@ BAROSIM::print_info()
|
||||
{
|
||||
perf_print_counter(_sample_perf);
|
||||
perf_print_counter(_comms_errors);
|
||||
perf_print_counter(_buffer_overflows);
|
||||
PX4_INFO("poll interval: %u usec", m_sample_interval_usecs);
|
||||
_reports->print_info("report queue");
|
||||
PX4_INFO("TEMP: %f", (double)report.temperature);
|
||||
|
||||
Reference in New Issue
Block a user