Skip to content
Snippets Groups Projects
Commit 8a2e3800 authored by Christian Rauch's avatar Christian Rauch Committed by David Sidrane
Browse files

check CONFIG_SCHED_INSTRUMENTATION for print_load_nuttx

parent fce35ba9
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,10 @@
#include <uORB/topics/cpuload.h>
#include <uORB/topics/task_stack_info.h>
#if defined(__PX4_NUTTX) && !defined(CONFIG_SCHED_INSTRUMENTATION)
# error load_mon support requires CONFIG_SCHED_INSTRUMENTATION
#endif
extern struct system_load_s system_load;
#define STACK_LOW_WARNING_THRESHOLD 300 ///< if free stack space falls below this, print a warning
......
......@@ -35,6 +35,10 @@
#include <px4_log.h>
#if defined(__PX4_NUTTX) && !defined(CONFIG_SCHED_INSTRUMENTATION)
# error watchdog support requires CONFIG_SCHED_INSTRUMENTATION
#endif
using namespace time_literals;
namespace px4
......
......@@ -46,6 +46,8 @@
#include <systemlib/printload.h>
#include <drivers/drv_hrt.h>
#if defined(CONFIG_SCHED_INSTRUMENTATION)
extern struct system_load_s system_load;
#define CL "\033[K" // clear line
......@@ -380,3 +382,5 @@ void print_load(uint64_t t, int fd, struct print_load_s *print_state)
print_load_buffer(t, data.buffer, sizeof(data.buffer), print_load_callback, &data, print_state);
}
#endif // if CONFIG_SCHED_INSTRUMENTATION
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment