Skip to content

AP_Scripting: correct use of pcall in examples and applets #30081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions libraries/AP_Scripting/applets/VTOL-quicktune.lua
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,7 @@ function protected_wrapper()
gcs:send_text(MAV_SEVERITY_EMERGENCY, "Internal Error: " .. err)
-- when we fault we run the update function again after 1s, slowing it
-- down a bit so we don't flood the console with errors
--return protected_wrapper, 1000
return
return protected_wrapper, 1000
end
return protected_wrapper, 1000/UPDATE_RATE_HZ
end
Expand Down
3 changes: 1 addition & 2 deletions libraries/AP_Scripting/applets/revert_param.lua
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ function protected_wrapper()
gcs:send_text(MAV_SEVERITY.EMERGENCY, "Internal Error: " .. err)
-- when we fault we run the update function again after 1s, slowing it
-- down a bit so we don't flood the console with errors
--return protected_wrapper, 1000
return
return protected_wrapper, 1000
end
return protected_wrapper, 1000/UPDATE_RATE_HZ
end
Expand Down
3 changes: 1 addition & 2 deletions libraries/AP_Scripting/applets/rover-quicktune.lua
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,7 @@ function protected_wrapper()
gcs:send_text(MAV_SEVERITY.CRITICAL, "RTun: Internal Error: " .. err)
-- when we fault we run the update function again after 1s, slowing it
-- down a bit so we don't flood the console with errors
--return protected_wrapper, 1000
return
return protected_wrapper, 1000
end
return protected_wrapper, 1000/UPDATE_RATE_HZ
end
Expand Down
3 changes: 1 addition & 2 deletions libraries/AP_Scripting/examples/gen_control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ function protected_wrapper()
gcs:send_text(MAV_SEVERITY_EMERGENCY, "Internal Error: " .. err)
-- when we fault we run the update function again after 1s, slowing it
-- down a bit so we don't flood the console with errors
--return protected_wrapper, 1000
return
return protected_wrapper, 1000
end
return protected_wrapper, 1000/UPDATE_RATE_HZ
end
Expand Down
Loading