invensense/icm20608-g: delete unnecessary perf counters

This commit is contained in:
Daniel Agar
2020-01-30 01:49:46 -05:00
parent aad27c4f94
commit e49112d406
3 changed files with 0 additions and 18 deletions
@@ -70,12 +70,10 @@ ICM20608G::~ICM20608G()
board_dma_free(_dma_data_buffer, FIFO::SIZE); board_dma_free(_dma_data_buffer, FIFO::SIZE);
} }
perf_free(_interval_perf);
perf_free(_transfer_perf); perf_free(_transfer_perf);
perf_free(_fifo_empty_perf); perf_free(_fifo_empty_perf);
perf_free(_fifo_overflow_perf); perf_free(_fifo_overflow_perf);
perf_free(_fifo_reset_perf); perf_free(_fifo_reset_perf);
perf_free(_drdy_count_perf);
perf_free(_drdy_interval_perf); perf_free(_drdy_interval_perf);
} }
@@ -218,7 +216,6 @@ int ICM20608G::DataReadyInterruptCallback(int irq, void *context, void *arg)
void ICM20608G::DataReady() void ICM20608G::DataReady()
{ {
perf_count(_drdy_count_perf);
perf_count(_drdy_interval_perf); perf_count(_drdy_interval_perf);
_data_ready_count++; _data_ready_count++;
@@ -271,8 +268,6 @@ void ICM20608G::Stop()
void ICM20608G::Run() void ICM20608G::Run()
{ {
perf_count(_interval_perf);
// use timestamp from the data ready interrupt if available, // use timestamp from the data ready interrupt if available,
// otherwise use the time now roughly corresponding with the last sample we'll pull from the FIFO // otherwise use the time now roughly corresponding with the last sample we'll pull from the FIFO
const hrt_abstime timestamp_sample = (hrt_elapsed_time(&_time_data_ready) < FIFO_INTERVAL) ? _time_data_ready : const hrt_abstime timestamp_sample = (hrt_elapsed_time(&_time_data_ready) < FIFO_INTERVAL) ? _time_data_ready :
@@ -301,13 +296,6 @@ void ICM20608G::Run()
return; return;
} }
// check for FIFO overflow
if (RegisterRead(Register::INT_STATUS) & INT_STATUS_BIT::FIFO_OFLOW_INT) {
perf_count(_fifo_overflow_perf);
ResetFIFO();
return;
}
// Transfer data // Transfer data
struct TransferBuffer { struct TransferBuffer {
uint8_t cmd; uint8_t cmd;
@@ -388,12 +376,10 @@ void ICM20608G::Run()
void ICM20608G::PrintInfo() void ICM20608G::PrintInfo()
{ {
perf_print_counter(_interval_perf);
perf_print_counter(_transfer_perf); perf_print_counter(_transfer_perf);
perf_print_counter(_fifo_empty_perf); perf_print_counter(_fifo_empty_perf);
perf_print_counter(_fifo_overflow_perf); perf_print_counter(_fifo_overflow_perf);
perf_print_counter(_fifo_reset_perf); perf_print_counter(_fifo_reset_perf);
perf_print_counter(_drdy_count_perf);
perf_print_counter(_drdy_interval_perf); perf_print_counter(_drdy_interval_perf);
_px4_accel.print_status(); _px4_accel.print_status();
@@ -84,12 +84,10 @@ private:
PX4Accelerometer _px4_accel; PX4Accelerometer _px4_accel;
PX4Gyroscope _px4_gyro; PX4Gyroscope _px4_gyro;
perf_counter_t _interval_perf{perf_alloc(PC_INTERVAL, MODULE_NAME": run interval")};
perf_counter_t _transfer_perf{perf_alloc(PC_ELAPSED, MODULE_NAME": transfer")}; perf_counter_t _transfer_perf{perf_alloc(PC_ELAPSED, MODULE_NAME": transfer")};
perf_counter_t _fifo_empty_perf{perf_alloc(PC_COUNT, MODULE_NAME": fifo empty")}; perf_counter_t _fifo_empty_perf{perf_alloc(PC_COUNT, MODULE_NAME": fifo empty")};
perf_counter_t _fifo_overflow_perf{perf_alloc(PC_COUNT, MODULE_NAME": fifo overflow")}; perf_counter_t _fifo_overflow_perf{perf_alloc(PC_COUNT, MODULE_NAME": fifo overflow")};
perf_counter_t _fifo_reset_perf{perf_alloc(PC_COUNT, MODULE_NAME": fifo reset")}; perf_counter_t _fifo_reset_perf{perf_alloc(PC_COUNT, MODULE_NAME": fifo reset")};
perf_counter_t _drdy_count_perf{perf_alloc(PC_COUNT, MODULE_NAME": drdy count")};
perf_counter_t _drdy_interval_perf{perf_alloc(PC_INTERVAL, MODULE_NAME": drdy interval")}; perf_counter_t _drdy_interval_perf{perf_alloc(PC_INTERVAL, MODULE_NAME": drdy interval")};
hrt_abstime _time_data_ready{0}; hrt_abstime _time_data_ready{0};
@@ -67,7 +67,6 @@ enum class Register : uint8_t {
INT_STATUS = 0x3A, INT_STATUS = 0x3A,
INT_PIN_CFG = 0x37,
INT_ENABLE = 0x38, INT_ENABLE = 0x38,
TEMP_OUT_H = 0x41, TEMP_OUT_H = 0x41,
@@ -170,7 +169,6 @@ struct DATA {
uint8_t GYRO_ZOUT_H; uint8_t GYRO_ZOUT_H;
uint8_t GYRO_ZOUT_L; uint8_t GYRO_ZOUT_L;
}; };
static_assert(sizeof(DATA) == 12);
} }
} // namespace InvenSense_ICM20608G } // namespace InvenSense_ICM20608G