Skip to content
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

"mobiflightsimvar_led" improvements #112

Open
vicentezc opened this issue May 30, 2022 · 2 comments
Open

"mobiflightsimvar_led" improvements #112

vicentezc opened this issue May 30, 2022 · 2 comments

Comments

@vicentezc
Copy link

Hello,

I am working on a config for the PMDG737 and I have noticed that the "mobiflightsimvar_led" feature doesn't always work well because in some cases the "ON" value is different than 1.
Is there a way to make an improvement so that the "ON" value can be set along with the variable?
Example:
"mobiflightsimvar_led": "(L:switch_3801_73X) == 0.5"

Thanks!
Vicente

@mkx173
Copy link
Contributor

mkx173 commented Jun 1, 2022

I actually implemented this locally but haven't submit a pull request because there are two options and I don't know which one is better. The first option is that the led is off when the value is 0 and on otherwise, and you can set additional values where the led will stay off. The second option is the led is always off and you can add values that will turn on the led. Which one do you think is better?

Or additionally I can make it a jinja2 script, but maybe that's an overkill.

@vicentezc
Copy link
Author

vicentezc commented Jun 1, 2022

So as an example, I noticed that the state of the ATHR ARM switch in the PMDG 737 can be determined using two variables with the following values:
| ATHR ARM Position | ARMED | OFF |
| L:switch_3801_73X | 0.5 | 0 |
| L:switch_380_73X | 0 | 100 |

This shows that in some cases, we may want the led ON when the Lvar is 0 (I don't understand why PMDG made that choice).
So in the first option, if the led was off with value of L:switch_380_73X == 0, that wouldn't work.
I think it's more intuitive to define the value(s) for the led to be ON.
It could be either a list of 1-N values (e.g. for switches with more than 2 positions), or when value is greater/lower than X. I guess that would cover most cases.
Then of course, if no value is defined, the current default would apply (Off = 0 / On = 1).

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants