-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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: Applets: MissionSelector: fix error on file open and checker errors #28520
AP_Scripting: Applets: MissionSelector: fix error on file open and checker errors #28520
Conversation
@@ -64,7 +61,6 @@ local function read_mission(file_name) | |||
end | |||
index = index + 1 | |||
end | |||
file:close() |
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 unreachable.
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.
thanks...while we are at it could you add:
gcs:send_text(5,"Loaded MissionSelector.lua")
before the last line....I think a notification at boot of what scripts actually are running is worthwhile and have been asking submitters to add this when I catch it....
f5985a4
to
5fdbf29
Compare
Done. |
Why do you wait till armed to load the mission? Surely this could happen (on Plane):
resulting in the vehicle just sitting on the ground, instead of taking off to fly the selected mission. No? |
if there is no mission and you are in AUTO, you cant arm.....if there is, the existing mission wont be cleared(because its actually in progress when you switched mode to AUTO, even disarmed), it will run normally, and the script will send GCS text warnings to inform the user....one would first arm in some other mode, like FBWA(loading the desired mission....or not if there is no file), then switch to AUTO to run auto missions |
The comments at the top of the file say this |
the first senteence applies to the Mission Reset switch....it indeed functions normally as Mission Reset whether armed or disarrmed |
Ages ago file open would always succeed, we fixed the other scripts and missed this one. Now file can be
nil
so we need to check for that. This fixes the script so we can run the static checkers.