AP_Scripting: correct compilation when HAL_LOGGER_FILE_CONTENTS_ENABLED is 0

This commit is contained in:
Peter Barker 2021-12-06 15:11:29 +11:00 committed by Peter Barker
parent cce14d8461
commit d72d0578a3

View File

@ -205,9 +205,11 @@ void lua_scripts::load_all_scripts_in_dir(lua_State *L, const char *dirname) {
}
reschedule_script(script);
#if HAL_LOGGER_FILE_CONTENTS_ENABLED
if ((_debug_options.get() & uint8_t(DebugLevel::SUPPRESS_SCRIPT_LOG)) == 0) {
AP::logger().log_file_content(filename);
}
#endif
}
AP::FS().closedir(d);
}