-
Notifications
You must be signed in to change notification settings - Fork 16.9k
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: added get_aux_cached() #21928
Conversation
local last_aux_pos = nil | ||
|
||
function update() | ||
local aux_pos = rc:get_aux_cached(AUX_FUNCTION_NUM) |
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 would like a plane for when we can di:
local aux_pos = aux:get_cached(AuxFunc::Number)
(or whatever).
Do we put stub functions in? Forever-more?
Just want a plan, this isn't a blocker.
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.
We could do it as a manual binding to allow us to give it a custom name for now and change it when the aux split happens
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.
we could make that possible if/when we have aux:
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.
One its in rc
were stuck with it in rc
unless we make a braking change, something we have avoided thus far.
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 don't think it is terrible it being in rc, but if/when we added aux we could make it available in both
note that we have the same problem already with rc:run_aux_function
allows for scripting to act on aux functions
c640d09
to
0e299b7
Compare
This allows for scripts to implement aux functions. This complements the new Aux Function tab in MissionPlanner, allowing for scripts to implement aux functions via DO_AUX_FUNCTION in mavlink or missions or via rc switches
It also adds a binding for scripts to read relay state