file paths: add PX4_STORAGEDIR & use it where appropriate

This commit is contained in:
Beat Küng
2018-08-04 12:54:09 +02:00
committed by Lorenz Meier
parent 57a85fbc61
commit c0cac0594e
17 changed files with 33 additions and 50 deletions
+1 -5
View File
@@ -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);
+1 -5
View File
@@ -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};