Recently i encountered in some problem.
I’ve added my uORB message, and i wanted to log it.
As i understood from the manual pages, i should open file logger_topics.txt on the SD card, write the message and logging rate to the file.
Here is the problem: if the file is in use, it has to include all the messages you want to log, not only those you’d like to add.
For my opinion, it’s not so good, i would recommend to make the following change to the logger.cpp:
Original code:
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);
} else {
initialize_configured_topics();
}
Changed code:
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);
}
initialize_configured_topics();
Meaning, always try to read the file, and add custom messages to the Logger.