Browse Source

print_load: Remove reference to CONFIG_MAX_TASKS

This is already removed from nuttx, and in posix the size of s->last_times
can be just checked with sizeof()

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
master
Jukka Laitinen 3 years ago committed by Daniel Agar
parent
commit
39c0c68167
  1. 1
      platforms/posix/include/system_config.h
  2. 2
      platforms/posix/src/px4/common/print_load.cpp

1
platforms/posix/include/system_config.h

@ -63,4 +63,3 @@ @@ -63,4 +63,3 @@
#define CONFIG_SCHED_WORKPERIOD 50000
#define CONFIG_SCHED_INSTRUMENTATION 1
#define CONFIG_MAX_TASKS 32

2
platforms/posix/src/px4/common/print_load.cpp

@ -72,7 +72,7 @@ void init_print_load(struct print_load_s *s) @@ -72,7 +72,7 @@ void init_print_load(struct print_load_s *s)
s->new_time = hrt_absolute_time();
s->interval_start_time = s->new_time;
for (int i = 0; i < CONFIG_MAX_TASKS; i++) {
for (size_t i = 0; i < sizeof(s->last_times) / sizeof(s->last_times[0]); i++) {
s->last_times[i] = 0;
}

Loading…
Cancel
Save