move default topics into logger.cpp; add on/off command

look for alternate topic list at
/fs/microsd/etc/logging/logger_topics.txt
on and off commands have the same effect as arm/disarm
This commit is contained in:
Mark Whitehorn
2016-06-10 08:51:54 +02:00
committed by Beat Küng
parent 2bd15f1698
commit 0ca63fa379
2 changed files with 58 additions and 3 deletions
+6
View File
@@ -107,6 +107,8 @@ public:
void status();
void set_arm_override(bool override) { _arm_override = override; }
private:
static void run_trampoline(int argc, char *argv[]);
@@ -193,6 +195,8 @@ private:
*/
int add_topics_from_file(const char *fname);
void add_default_topics();
static constexpr size_t MAX_TOPICS_NUM = 64; /**< Maximum number of logged topics */
static constexpr unsigned MAX_NO_LOGFOLDER = 999; /**< Maximum number of log dirs */
static constexpr unsigned MAX_NO_LOGFILE = 999; /**< Maximum number of log files */
@@ -209,6 +213,8 @@ private:
bool _has_log_dir = false;
bool _enabled = false;
bool _was_armed = false;
bool _arm_override;
// statistics
hrt_abstime _start_time; ///< Time when logging started (not the logger thread)