Skip to content

Commit

Permalink
AP_Scripting: only log aerobatic trick file when supported
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tpwrules authored and IamPete1 committed Jan 21, 2025
1 parent 781b6bd commit 429ed5c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 429ed5c

Please sign in to comment.