Skip to content

Scripted Arming Checks #30009

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

timtuxworth
Copy link
Contributor

@timtuxworth timtuxworth commented May 8, 2025

This adds a Lua Applet for scripted arming checks. Each check can be set as mandatory (generates a prearm fail), warning (displays a message, but allows arming) or disabled by setting a parameter.

There is a set of standard checks that I find useful, of course new ones can be added. Any suggestions appreciated.

This is designed to get around the controversy that often arises about adding arming checks to c++. To some people particular checks are essential, while to others they are unnecessary or annoying.

This works for plane, copter and rover for now, but as a base could easily be extended to other vehicles.

@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label May 8, 2025
Copy link
Contributor

@rmackay9 rmackay9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, just one thing, I guess this is Plane specific? If "yes", could the script be renamed to be prefixed with "plane-"?

@timtuxworth
Copy link
Contributor Author

Thanks for this, just one thing, I guess this is Plane specific? If "yes", could the script be renamed to be prefixed with "plane-"?

Well I am hoping to simply extend it to do other vehicles, rather than having different scripts. I'm expecting there will be a lot of common checks. That's my theory anyway.

@rmackay9
Copy link
Contributor

rmackay9 commented May 8, 2025

Hi @timtuxworth,

OK great, if it's meant to work on all vehicles, could you test this by running it on Copter (and perhaps Rover if you have time)? I suspect the calls to get the Q_ENABLE parameter will mean the script errors out on copter

@timtuxworth timtuxworth force-pushed the pr-scripted-arming-checks branch from 49a9061 to e12b18b Compare May 8, 2025 07:55
@timtuxworth
Copy link
Contributor Author

Hi @timtuxworth,

OK great, if it's meant to work on all vehicles, could you test this by running it on Copter (and perhaps Rover if you have time)? I suspect the calls to get the Q_ENABLE parameter will mean the script errors out on copter

Done! And fixed because yes you were right there were a couple of errors. Now works with at least Plane, Copter, Rover. There are 4 checks common to all and 6 common between Plane and Copter.

@timtuxworth timtuxworth force-pushed the pr-scripted-arming-checks branch from e12b18b to 0d015c3 Compare May 8, 2025 08:52
@timtuxworth timtuxworth force-pushed the pr-scripted-arming-checks branch from 0d015c3 to 28a31d0 Compare May 8, 2025 12:36
self.wait_text("Cleared: FOLL_SYSID not set", check_context=True)

''' Need a healthy camera mount defined for this to work '''
self .start_subsubtest("ArmCk: Mount SYSID must be match FOLL_SYSID")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self .start_subsubtest("ArmCk: Mount SYSID must be match FOLL_SYSID")
self.start_subsubtest("ArmCk: Mount SYSID must be match FOLL_SYSID")

Extra space?

@Ryanf55
Copy link
Collaborator

Ryanf55 commented May 9, 2025

Very nice Tim!

@timtuxworth timtuxworth force-pushed the pr-scripted-arming-checks branch from 28a31d0 to 8307ecf Compare May 9, 2025 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants