-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
AP_Scripting: fix outstanding luacheck issues #28931
Conversation
I'm happy with the changes affecting scripts I'm responsible for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, some tiny nits attached.
libraries/AP_Scripting/applets/Aerobatics/FixedWing/RateBased/sport_aerobatics.lua
Outdated
Show resolved
Hide resolved
-- clear vars we don't need anymore | ||
slew_down_time = nil | ||
slew_up_time = nil | ||
pwm_range = nil | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could enclose the above in a do ... end
block to create a new scope and actually destroy them but since they are just numbers it is probably a net negative.
f13d4f1
to
3b0d1a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mangled the comment syntax, sorry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you're right. Don't need the additional --
, just the ]]
.
LGTM overall, thanks.
Hopefully exposing more code to the checker doesn't lead to too many more issues as it changes. Maybe we need to pin it :)
@@ -474,11 +464,10 @@ function do_knife_edge(arg1,arg2) | |||
if not running then | |||
running = true | |||
height_PI.reset() | |||
knife_edge_s = now | |||
knife_edge_ms = now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is in seconds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the Scipting_Controller.lua and sport_aerobatics.lua should be broken out for @Hwurzburg to look at
3b0d1a8
to
e3b69a5
Compare
Changes to those two files have been dropped. |
Tridge's request to remove aerobatics has been addressed
This fixes all the lua check issues, no more
-- luacheck: only 0
. There are still lots of lua language server issues that we should fix.....