Spad.Next LVAR for Yoke Rocker Trim Switch
-
Hi there. Does anyone know how to create a new variable or how to find the variable of the electrical trim switch located on the yoke -in the sim- in Spad.Next? I didn't find anything after 2 hours, would like to use the rocker switch on my actual yoke, trim up/down with creating a condition to work only when electric trim switch is set to on is a good bypass, but it breaks the immersion since the acutal rocker switch is not moving on the yoke but rather the trim wheel.
-
Hi there. Does anyone know how to create a new variable or how to find the variable of the electrical trim switch located on the yoke -in the sim- in Spad.Next? I didn't find anything after 2 hours, would like to use the rocker switch on my actual yoke, trim up/down with creating a condition to work only when electric trim switch is set to on is a good bypass, but it breaks the immersion since the acutal rocker switch is not moving on the yoke but rather the trim wheel.
@GreenHat it's really simple. These are the scripts I use to operate the trim rocker on the yoke, inspired by the code of the virtual cockpit rocker switch (understand: most of it is blatantly copied from the aircraft files)
up (actually not sure which one's up or down, you'll have to try):
8 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:52, Bool) (A:ELECTRICAL MAIN BUS VOLTAGE:8, Volts) 12 > and (L:var_PitchTrimPower, bool) and if{ (A:ELEVATOR TRIM PCT, Percent) 163.83 * 16 + 16383 min -16383 max (>K:ELEVATOR_TRIM_SET) } 1 (>A:CIRCUIT SWITCH ON:52, bool)
down:
8 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:52, Bool) (A:ELECTRICAL MAIN BUS VOLTAGE:8, Volts) 12 > and (L:var_PitchTrimPower, bool) and if{ (A:ELEVATOR TRIM PCT, Percent) 163.83 * 16 - 16383 min -16383 max (>K:ELEVATOR_TRIM_SET) } 1 (>A:CIRCUIT SWITCH ON:52, bool)
middle position (or on release of either of the above):
0 (>A:CIRCUIT SWITCH ON:52, bool)
-
@GreenHat it's really simple. These are the scripts I use to operate the trim rocker on the yoke, inspired by the code of the virtual cockpit rocker switch (understand: most of it is blatantly copied from the aircraft files)
up (actually not sure which one's up or down, you'll have to try):
8 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:52, Bool) (A:ELECTRICAL MAIN BUS VOLTAGE:8, Volts) 12 > and (L:var_PitchTrimPower, bool) and if{ (A:ELEVATOR TRIM PCT, Percent) 163.83 * 16 + 16383 min -16383 max (>K:ELEVATOR_TRIM_SET) } 1 (>A:CIRCUIT SWITCH ON:52, bool)
down:
8 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:52, Bool) (A:ELECTRICAL MAIN BUS VOLTAGE:8, Volts) 12 > and (L:var_PitchTrimPower, bool) and if{ (A:ELEVATOR TRIM PCT, Percent) 163.83 * 16 - 16383 min -16383 max (>K:ELEVATOR_TRIM_SET) } 1 (>A:CIRCUIT SWITCH ON:52, bool)
middle position (or on release of either of the above):
0 (>A:CIRCUIT SWITCH ON:52, bool)
-
@Randolf.
Thank you for your help. Another question, where and how can I find such code(s)?I browsed thru all of the .xml and .cfg files of the duke with no luck.
-
@GreenHat
Here, for example, are the behaviors of virtual cockpit controls for the Grand Duke:
bksq-aircraft-pistonduke\SimObjects\Airplanes\bksq-aircraft-grandduke\model.base\PistonDuke_INT.xml
-
@Randolf Thank you. That explains it. Silly me, I thought each version has its own stuff, and for the defatult/stock duke i was looking in its own directories.
-
@GreenHat I haven't used the stock Duke yet, but I can see that for many files, it's
aircraft.cfg
is pointing to the Grand Duke folder, like this:
model = "\..\..\bksq-aircraft-grandduke\model.base"
Currently trying to implement the script you provided. Spad.Next rejects it with the following error message: (1,4) error CS1525: Unexpected symbol '>'
I am trying to add the script under the Extra (plus symbol) tab->>Scripts->>Add Scripts.
Any ideas?
-
Currently trying to implement the script you provided. Spad.Next rejects it with the following error message: (1,4) error CS1525: Unexpected symbol '>'
I am trying to add the script under the Extra (plus symbol) tab->>Scripts->>Add Scripts.
Any ideas?
-
@GreenHat I don't know, never used Spad.Next.
This is the RPN format script as used by the sim and both FSUIPC and AAO. Can't find online any docs for Spad related to this. Maybe it's expecting some other format?@Randolf Definitely. It requires .cs file fromat, I suspected it won't be as easy as saving the script in text editor then renaming it to FILENAME.cs.
Currently browsing the forums to how to even create a script.... I never did such thing, used to modify existing ones back in the days for FSX and GTA:SA, but those were different times.
Anyways, thanks for your help, I will figure this out from this point.