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>
This commit is contained in:
Jukka Laitinen 2021-09-06 11:43:16 +03:00 committed by Daniel Agar
parent 9299a5c3f6
commit 39c0c68167
2 changed files with 1 additions and 2 deletions

View File

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

View File

@ -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;
}