mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 20:43:34 +08:00
Improve new logger update rate (#5073)
* logger: disable some default topics, which are most likely not used This is also to safe CPU and lower the amount of file descriptors used. * logger: use the hrt timer for more accurate scheduling Under NuttX with the default rate of 285Hz, the actual measured rate was only 200Hz while on Linux it was ~280Hz. The reason is that NuttX only uses a usleep() granularity of 1ms, so that the typical sleep time is longer than what we set. Now the logger waits on a semaphore, which gets activated periodically with a hrt timer. With this the measured rate is exactly the expected one, 285Hz.
This commit is contained in:
@@ -75,7 +75,7 @@ struct LoggerSubscription {
|
||||
class Logger
|
||||
{
|
||||
public:
|
||||
Logger(size_t buffer_size, unsigned log_interval, bool log_on_start,
|
||||
Logger(size_t buffer_size, uint32_t log_interval, bool log_on_start,
|
||||
bool log_until_shutdown, bool log_name_timestamp);
|
||||
|
||||
~Logger();
|
||||
|
||||
Reference in New Issue
Block a user