AP_Scheduler: fixes for AP_SCHEDULER_ENABLED

This commit is contained in:
Peter Barker 2024-03-07 18:52:58 +11:00 committed by Peter Barker
parent fe9bcb9b5b
commit 35dbf93e13
4 changed files with 20 additions and 0 deletions

View File

@ -21,6 +21,8 @@
#include "AP_Scheduler_config.h" #include "AP_Scheduler_config.h"
#if AP_SCHEDULER_ENABLED
#include "AP_Scheduler.h" #include "AP_Scheduler.h"
#include <AP_HAL/AP_HAL.h> #include <AP_HAL/AP_HAL.h>
@ -539,3 +541,5 @@ AP_Scheduler &scheduler()
} }
}; };
#endif // AP_SCHEDULER_ENABLED

View File

@ -22,6 +22,8 @@
#include "AP_Scheduler_config.h" #include "AP_Scheduler_config.h"
#if AP_SCHEDULER_ENABLED
#include <AP_Param/AP_Param.h> #include <AP_Param/AP_Param.h>
#include <AP_HAL/Semaphores.h> #include <AP_HAL/Semaphores.h>
#include <AP_HAL/Util.h> #include <AP_HAL/Util.h>
@ -268,3 +270,5 @@ private:
namespace AP { namespace AP {
AP_Scheduler &scheduler(); AP_Scheduler &scheduler();
}; };
#endif // AP_SCHEDULER_ENABLED

View File

@ -1,3 +1,7 @@
#include "AP_Scheduler_config.h"
#if AP_SCHEDULER_ENABLED
#include "PerfInfo.h" #include "PerfInfo.h"
#include <AP_Logger/AP_Logger.h> #include <AP_Logger/AP_Logger.h>
@ -217,3 +221,5 @@ void AP::PerfInfo::set_loop_rate(uint16_t rate_hz)
filtered_loop_time = 1.0f / rate_hz; filtered_loop_time = 1.0f / rate_hz;
} }
} }
#endif // AP_SCHEDULER_ENABLED

View File

@ -1,5 +1,9 @@
#pragma once #pragma once
#include "AP_Scheduler_config.h"
#if AP_SCHEDULER_ENABLED
#include <stdint.h> #include <stdint.h>
#include <AP_Common/ExpandingString.h> #include <AP_Common/ExpandingString.h>
@ -76,3 +80,5 @@ private:
}; };
}; };
#endif // AP_SCHEDULER_ENABLED