mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-22 07:47:34 +08:00
file paths: add PX4_STORAGEDIR & use it where appropriate
This commit is contained in:
@@ -830,11 +830,7 @@ void Logger::run()
|
||||
orb_set_interval(log_message_sub, 20);
|
||||
|
||||
|
||||
#if __PX4_POSIX
|
||||
int ntopics = add_topics_from_file(PX4_ROOTFSDIR "/etc/logging/logger_topics.txt");
|
||||
#else
|
||||
int ntopics = add_topics_from_file(PX4_ROOTFSDIR "/fs/microsd/etc/logging/logger_topics.txt");
|
||||
#endif
|
||||
int ntopics = add_topics_from_file(PX4_STORAGEDIR "/etc/logging/logger_topics.txt");
|
||||
|
||||
if (ntopics > 0) {
|
||||
PX4_INFO("logging %d topics from logger_topics.txt", ntopics);
|
||||
|
||||
@@ -313,11 +313,7 @@ private:
|
||||
|
||||
static constexpr size_t MAX_TOPICS_NUM = 64; /**< Maximum number of logged topics */
|
||||
static constexpr unsigned MAX_NO_LOGFILE = 999; /**< Maximum number of log files */
|
||||
#ifdef __PX4_POSIX
|
||||
static constexpr const char *LOG_ROOT = PX4_ROOTFSDIR"/log";
|
||||
#else
|
||||
static constexpr const char *LOG_ROOT = PX4_ROOTFSDIR"/fs/microsd/log";
|
||||
#endif
|
||||
static constexpr const char *LOG_ROOT = PX4_STORAGEDIR "/log";
|
||||
|
||||
uint8_t *_msg_buffer{nullptr};
|
||||
int _msg_buffer_len{0};
|
||||
|
||||
Reference in New Issue
Block a user