mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 01:43:33 +08:00
invensense/mpu9250: delete redundant interval perf counter
This commit is contained in:
@@ -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,
|
||||||
@@ -171,7 +170,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_MPU9250
|
} // namespace InvenSense_MPU9250
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ MPU9250::~MPU9250()
|
|||||||
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);
|
||||||
@@ -261,8 +260,6 @@ void MPU9250::Stop()
|
|||||||
|
|
||||||
void MPU9250::Run()
|
void MPU9250::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 :
|
||||||
@@ -370,7 +367,6 @@ void MPU9250::Run()
|
|||||||
|
|
||||||
void MPU9250::PrintInfo()
|
void MPU9250::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);
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ 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")};
|
||||||
|
|||||||
Reference in New Issue
Block a user