AP_Scripting: only log aerobatic trick file when supported

LittleFS does not have this function implemented due to logging
bandwidth, so `logger:log_file_content` is nil. Don't call it unless it
exists, assuming this logging is not critical.
This commit is contained in:
Thomas Watson 2025-01-20 18:47:34 -06:00 committed by Peter Hall
parent 781b6bd8f8
commit 429ed5cdd2

View File

@ -3035,7 +3035,9 @@ function load_trick(id)
local pc = path_composer(name, paths)
gcs:send_text(MAV_SEVERITY.INFO, string.format("Loaded trick%u '%s'", id, name))
command_table[id] = PathFunction(pc, name)
logger:log_file_content(filename)
if logger.log_file_content then
logger:log_file_content(filename)
end
calculate_timestamps(command_table[id])
end