mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 18:23:34 +08:00
logger: add -p <topic> option to poll on a topic instead of running at fixed rate
this will be needed for fast replay. In addition, this option disables the orb interval. It can be removed again once we have time simulation.
This commit is contained in:
@@ -82,8 +82,8 @@ struct LoggerSubscription {
|
||||
class Logger
|
||||
{
|
||||
public:
|
||||
Logger(LogWriter::Backend backend, size_t buffer_size, uint32_t log_interval, bool log_on_start,
|
||||
bool log_until_shutdown, bool log_name_timestamp, unsigned int queue_size);
|
||||
Logger(LogWriter::Backend backend, size_t buffer_size, uint32_t log_interval, const char *poll_topic_name,
|
||||
bool log_on_start, bool log_until_shutdown, bool log_name_timestamp, unsigned int queue_size);
|
||||
|
||||
~Logger();
|
||||
|
||||
@@ -252,6 +252,7 @@ private:
|
||||
Array<LoggerSubscription, MAX_TOPICS_NUM> _subscriptions;
|
||||
LogWriter _writer;
|
||||
uint32_t _log_interval;
|
||||
const orb_metadata *_polling_topic_meta = nullptr; ///< if non-null, poll on this topic instead of sleeping
|
||||
param_t _log_utc_offset;
|
||||
orb_advert_t _mavlink_log_pub = nullptr;
|
||||
uint16_t _next_topic_id = 0; ///< id of next subscribed ulog topic
|
||||
|
||||
Reference in New Issue
Block a user