Jump to content
The simFlight Network Forums

Axes and Potentiometer


JoeAir

Recommended Posts

https://github.com/joeherwig/A32nx-LINDA-aircraft-module/blob/017b120227d9d2b5a2bb24fff0b685925425a237/A32nx/LINDA/aircrafts/FBW A320/user.lua#L12 shows the example for just two synced dimmers. (PFD + ND)  if someone wants to map all display brightness it will become even longer. But the 1k you provided should definitely be a good value. 

Link to comment
Share on other sites

On 2/7/2022 at 3:58 PM, John Dowson said:

There is a version available, v7/2/16c, including an updated WASM, that has a 1k limit for the calculator code if you would like to try it. It can be found here:
    http://www.fsuipc.com/download/Install_FSUIPC7v7.2.16c.zip

John

Tried it with 
 

@ 10.23 / {value} max 100 min 88 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / {value} max 100 min 89 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / {value} max 100 min 8 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / {value} max 100 min 92 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / {value} max 100 min 93 (>K:2:LIGHT_POTENTIOMETER_SET)

wich is >255 chars for CPT PFD, ND, ECAM1 and ECAM2 and works like a charm. Thanks a lot John!

Link to comment
Share on other sites

  • 7 months later...

Since John added already the capability to use parameterized CalculatorCode Presets on axes as well i just added the dimmers now based on that standard mode:

Just add the lines for your myevents.txt

A32NX_LIGHT_POTI_CPT_PFD#@ 10.23 / $Param 16384 + 327.86 / max 100 min 88 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_CPT_ND#@ 10.23 / $Param 16384 + 327.86 / max 100 min 89 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_CPT_WX_TERR#@ 10.23 / $Param 16384 + 327.86 / max 100 min 94 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_CPT_CONSOLE#@ 10.23 / $Param 16384 + 327.86 / max 100 min 8 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_FO_PFD#@ 10.23 / $Param 16384 + 327.86 / max 100 min 90 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_FO_ND#@ 10.23 / $Param 16384 + 327.86 / max 100 min 91 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_FO_WX_TERR#@ 10.23 / $Param 16384 + 327.86 / max 100 min 95 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_CPT_CONSOLE#@ 10.23 / $Param 16384 + 327.86 / max 100 min 9 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_FCU#@ 10.23 / $Param 16384 + 327.86 / max 100 min 87 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_ECAM_UPPER#@ 10.23 / $Param 16384 + 327.86 / max 100 min 92 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_ECAM_LOWER#@ 10.23 / $Param 16384 + 327.86 / max 100 min 93 (>K:2:LIGHT_POTENTIOMETER_SET)
A32NX_LIGHT_POTI_DISP+INTEGLT#@ 10.23 / $Param 16384 + 327.86 / max 100 min 88 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / $Param 16384 + 327.86 / max 100 min 89 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / $Param 16384 + 327.86 / max 100 min 93 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / $Param 16384 + 327.86 / max 100 min 92 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / $Param 16384 + 327.86 / max 100 min 87 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / $Param 16384 + 327.86 / max 100 min 85 (>K:2:LIGHT_POTENTIOMETER_SET) @ 10.23 / $Param 16384 + 327.86 / max 100 min 86 (>K:2:LIGHT_POTENTIOMETER_SET)

and then assign it in FSUIPC directly:
LightPotentiometer_range.png.16e8a573b9ffd58a0712da544eba372e.png

  • Like 1
Link to comment
Share on other sites

Thanks @joeherwig. I thought I had removed axes assignments to presets as I wasn't sure if this was that useful and am uncertain about the performance when controlling an axis using calculator code. I added the preset checkbox to allow presets to be used in the right-hand side, but this also has the effect of allowing the preset to also be assigned to the axus input. This isn't an issue in itself, but I think there may be some issues when reviewing an axis assignment to a preset - I will check this and also update the documentation for this.

Cheers,

John
 

Link to comment
Share on other sites

Hi John,

If you keep that "side effect" it would be very nice. 👍
If you can adjust it to refer to the name instead of the line index (or whatever it is) it would be perfect. 👍👍👍🧡

As at least on my quite old system with quad core and 1080ti only i cannot notice any performance impact even with the really long combination of multiple calculator codes.

Joe

Link to comment
Share on other sites

1 hour ago, joeherwig said:

If you can adjust it to refer to the name instead of the line index (or whatever it is) it would be perfect. 👍👍👍🧡

Could you try the attached beta please, 7.3.9e. This should automatically re-write your ini to use the preset name when assigned to an axis, although you may have to go into the axis assignment dialog and click 'OK' to update.

Thanks,

John

FSUIPC7.exe

  • Thanks 1
Link to comment
Share on other sites

20 hours ago, John Dowson said:

Could you try the attached beta please, 7.3.9e. This should automatically re-write your ini to use the preset name when assigned to an axis, although you may have to go into the axis assignment dialog and click 'OK' to update.

Hi John,

Works like a charm in 7.3.9e.
Thanks a lot!

0=DX,256,F,PA32NX_LIGHT_POTI_DISP+INTEGLT,0,0,0	-{ TO SIM: Preset Control }-
11=DY,256,F,PA32NX_LIGHT_POTI_FO_PFD,0,0,0	-{ TO SIM: Preset Control }-

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.