Skip to content

Commit 429ed5c

Browse files
tpwrulesIamPete1
authored andcommitted
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.
1 parent 781b6bd commit 429ed5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libraries/AP_Scripting/applets/Aerobatics/FixedWing/plane_aerobatics.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3035,7 +3035,9 @@ function load_trick(id)
30353035
local pc = path_composer(name, paths)
30363036
gcs:send_text(MAV_SEVERITY.INFO, string.format("Loaded trick%u '%s'", id, name))
30373037
command_table[id] = PathFunction(pc, name)
3038-
logger:log_file_content(filename)
3038+
if logger.log_file_content then
3039+
logger:log_file_content(filename)
3040+
end
30393041

30403042
calculate_timestamps(command_table[id])
30413043
end

0 commit comments

Comments
 (0)