From e49112d40697b31522b8024c8e7a80e5cd080a99 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Thu, 30 Jan 2020 01:49:46 -0500 Subject: [PATCH] invensense/icm20608-g: delete unnecessary perf counters --- .../imu/invensense/icm20608-g/ICM20608G.cpp | 14 -------------- .../imu/invensense/icm20608-g/ICM20608G.hpp | 2 -- .../icm20608-g/InvenSense_ICM20608G_registers.hpp | 2 -- 3 files changed, 18 deletions(-) diff --git a/src/drivers/imu/invensense/icm20608-g/ICM20608G.cpp b/src/drivers/imu/invensense/icm20608-g/ICM20608G.cpp index 00560f7f70..db9ab3028c 100644 --- a/src/drivers/imu/invensense/icm20608-g/ICM20608G.cpp +++ b/src/drivers/imu/invensense/icm20608-g/ICM20608G.cpp @@ -70,12 +70,10 @@ ICM20608G::~ICM20608G() board_dma_free(_dma_data_buffer, FIFO::SIZE); } - perf_free(_interval_perf); perf_free(_transfer_perf); perf_free(_fifo_empty_perf); perf_free(_fifo_overflow_perf); perf_free(_fifo_reset_perf); - perf_free(_drdy_count_perf); perf_free(_drdy_interval_perf); } @@ -218,7 +216,6 @@ int ICM20608G::DataReadyInterruptCallback(int irq, void *context, void *arg) void ICM20608G::DataReady() { - perf_count(_drdy_count_perf); perf_count(_drdy_interval_perf); _data_ready_count++; @@ -271,8 +268,6 @@ void ICM20608G::Stop() void ICM20608G::Run() { - perf_count(_interval_perf); - // 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 const hrt_abstime timestamp_sample = (hrt_elapsed_time(&_time_data_ready) < FIFO_INTERVAL) ? _time_data_ready : @@ -301,13 +296,6 @@ void ICM20608G::Run() 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 struct TransferBuffer { uint8_t cmd; @@ -388,12 +376,10 @@ void ICM20608G::Run() void ICM20608G::PrintInfo() { - perf_print_counter(_interval_perf); perf_print_counter(_transfer_perf); perf_print_counter(_fifo_empty_perf); perf_print_counter(_fifo_overflow_perf); perf_print_counter(_fifo_reset_perf); - perf_print_counter(_drdy_count_perf); perf_print_counter(_drdy_interval_perf); _px4_accel.print_status(); diff --git a/src/drivers/imu/invensense/icm20608-g/ICM20608G.hpp b/src/drivers/imu/invensense/icm20608-g/ICM20608G.hpp index 3fe5a5de6a..9e5a0eac36 100644 --- a/src/drivers/imu/invensense/icm20608-g/ICM20608G.hpp +++ b/src/drivers/imu/invensense/icm20608-g/ICM20608G.hpp @@ -84,12 +84,10 @@ private: PX4Accelerometer _px4_accel; 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 _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_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")}; hrt_abstime _time_data_ready{0}; diff --git a/src/drivers/imu/invensense/icm20608-g/InvenSense_ICM20608G_registers.hpp b/src/drivers/imu/invensense/icm20608-g/InvenSense_ICM20608G_registers.hpp index af14c1e5fa..cbb6cb26c8 100644 --- a/src/drivers/imu/invensense/icm20608-g/InvenSense_ICM20608G_registers.hpp +++ b/src/drivers/imu/invensense/icm20608-g/InvenSense_ICM20608G_registers.hpp @@ -67,7 +67,6 @@ enum class Register : uint8_t { INT_STATUS = 0x3A, - INT_PIN_CFG = 0x37, INT_ENABLE = 0x38, TEMP_OUT_H = 0x41, @@ -170,7 +169,6 @@ struct DATA { uint8_t GYRO_ZOUT_H; uint8_t GYRO_ZOUT_L; }; -static_assert(sizeof(DATA) == 12); } } // namespace InvenSense_ICM20608G