mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-20 07:59:06 +08:00
gyro_fft: reduce run frequency (still consuming all queued data)
This commit is contained in:
parent
3c80db9796
commit
20d8de2dca
@ -14,4 +14,4 @@ int16[32] z # angular velocity in the FRD board frame Z-axis in ra
|
||||
|
||||
uint8 rotation # Direction the sensor faces (see Rotation enum)
|
||||
|
||||
uint8 ORB_QUEUE_LENGTH = 2
|
||||
uint8 ORB_QUEUE_LENGTH = 4
|
||||
|
||||
@ -125,10 +125,11 @@ bool GyroFFT::SensorSelectionUpdate(bool force)
|
||||
|
||||
if (sensor_gyro_fifo_sub.get().device_id == sensor_selection.gyro_device_id) {
|
||||
if (_sensor_gyro_fifo_sub.ChangeInstance(i) && _sensor_gyro_fifo_sub.registerCallback()) {
|
||||
_sensor_gyro_fifo_sub.set_required_updates(sensor_gyro_fifo_s::ORB_QUEUE_LENGTH - 1);
|
||||
|
||||
// find corresponding vehicle_imu_status instance
|
||||
for (uint8_t imu_status = 0; imu_status < MAX_SENSOR_COUNT; imu_status++) {
|
||||
uORB::Subscription imu_status_sub{ORB_ID(vehicle_imu_status), imu_status};
|
||||
|
||||
vehicle_imu_status_s vehicle_imu_status;
|
||||
|
||||
if (imu_status_sub.copy(&vehicle_imu_status)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user