add preprocessor check for CONFIG_MODULES_LOGGER

This commit is contained in:
Jacob Dahl 2024-02-20 17:36:25 -09:00
parent 1e4204248d
commit c5f861b21d
2 changed files with 5 additions and 0 deletions

View File

@ -37,6 +37,8 @@ using namespace time_literals;
void LoggerChecks::checkAndReport(const Context &context, Report &reporter)
{
#if defined(CONFIG_MODULES_LOGGER)
bool active = false;
if (_param_sdlog_mode.get() >= 0) {
@ -55,4 +57,5 @@ void LoggerChecks::checkAndReport(const Context &context, Report &reporter)
}
reporter.setHealth(health_component_t::logging, active, false, false);
#endif
}

View File

@ -50,7 +50,9 @@ public:
private:
uORB::SubscriptionMultiArray<logger_status_s> _logger_status_sub{ORB_ID::logger_status};
#if defined(CONFIG_MODULES_LOGGER)
DEFINE_PARAMETERS_CUSTOM_PARENT(HealthAndArmingCheckBase,
(ParamInt<px4::params::SDLOG_MODE>) _param_sdlog_mode
)
#endif
};