-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Is it possible to run RPN scripts? #86
Comments
You can run scripts using the built in jinja2 engine. You can either code the script directly into the json file or link to a separate file, the latter one is recommended. The functions that you can call in a script can be found in the For more information about the syntax for if and else see https://jinja.palletsprojects.com/en/3.0.x/templates/ |
Oh okay, so you can't just pass in RPN scripts like the above? You've got to rewrite them in this kind of domain-specific language you've got? That's not a critique, I just want to make sure I understand this correctly. |
That's correct |
Is there any way to interact with local variables? In the example I gave above, you manipulate the Wing/Engine Anti-ice in the WT CJ4 with the L vars This is something that's possible in Axis and Ohs, is it possible with X-Touch-Mini-FS2020 as well? |
Nevermind, someone in the Working Title Discord advised me that L vars can be accessed from custom Mobiflight events. I think this solves me problem. |
Just to close this out, the answer to my question is a qualified yes, insofar as they have the Mobilflight WASM module installed and the RPN script is either an existing Mobiflight event (i.e. one found on HubHop) or---if the user wants to run a custom RPN script---must be added to their |
Is it possible to run a script, rather than an event, when a button is pressed? For example, this is how you toggle the Wing/Engine Anti-ice in the CJ4.
(A:STRUCTURAL DEICE SWITCH, Bool) 0 == if{ 1 (>L:DEICE_Airframe_1, bool) 1 (>L:DEICE_Airframe_2, bool) 1 (>K:TOGGLE_STRUCTURAL_DEICE) } els{ 0 (>L:DEICE_Airframe_1, bool) 0 (>L:DEICE_Airframe_2, bool) 0 (>K:TOGGLE_STRUCTURAL_DEICE) }
Can something like this be done?
The text was updated successfully, but these errors were encountered: