mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 02:20:34 +08:00
logger: add raw FIFO high-rate IMU logging profiles
Minimum requirement to use: set IMU_GYRO_RATEMAX to 400. Logging rate of a single topic: ~85 KB/s. If multiple should be logged, a really good SD card has to be used.
This commit is contained in:
@@ -490,6 +490,19 @@ bool Logger::initialize_topics()
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((sdlog_profile & SDLogProfileMask::RAW_IMU_ACCEL_FIFO) || (sdlog_profile & SDLogProfileMask::RAW_IMU_GYRO_FIFO)) {
|
||||
// if we are logging high-rate FIFO, reduce the logging interval & increase process priority to avoid missing samples
|
||||
PX4_INFO("Logging FIFO data: increasing task prio and logging rate");
|
||||
_log_interval = 800;
|
||||
sched_param param{};
|
||||
param.sched_priority = SCHED_PRIORITY_ATTITUDE_CONTROL;
|
||||
int ret = pthread_setschedparam(pthread_self(), SCHED_DEFAULT, ¶m);
|
||||
|
||||
if (ret != 0) {
|
||||
PX4_ERR("pthread_setschedparam failed (%i)", ret);
|
||||
}
|
||||
}
|
||||
|
||||
delete[](_subscriptions);
|
||||
_subscriptions = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user