X-Touch-Mini-FS2020 icon indicating copy to clipboard operation
X-Touch-Mini-FS2020 copied to clipboard

"mobiflightsimvar_led" improvements

Open vicentezc opened this issue 2 years ago • 2 comments

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

vicentezc avatar May 30 '22 22:05 vicentezc

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.

mi-ka-n avatar Jun 01 '22 06:06 mi-ka-n

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!

vicentezc avatar Jun 01 '22 16:06 vicentezc