[SPAD] Bvar support added in version 0.9.15.0 plus config snippets for various planes

SPAD just had an update released, that supports Bvars, with no messing around with those LVAR bridges.

Release notes:

So within SPAD, the Bvars are listed here:

image

So now you just need this for the Shorts:

image

image

*** Information below was removed from the BBS Shorts thread, linked below. The aim was to illustrate that the LVAR to BVAR bridge method is no longer necessary with the latest SPAD versions.

2 Likes

I had some luck with identifying the starter, and ignition controls. Starting with the following file, it points to other config files:

"D:\Flight Simulator\Community\blackbox-shorts-regional\SimObjects\Airplanes\BlackBox-Shorts-Regional-C23-BC\model.C23B\BBS-Shorts-330-interior.xml"

I then went into this file:

"D:\Flight Simulator\Community\blackbox-shorts-regional\SimObjects\Airplanes\BlackBox-Shorts-Regional-Common\ModelBehaviorDefs\BBS_NEW_Templates.xml"

This file defines some of the three position switches. There are two chunks of code that define the “BBS_STARTER_SWITCH”, and the “BBS_IGNITION_SWITCH”.

It looks like it’s these two Bvars.

B:ENGINE_Starter_#ID#

And for the ignition there is:

B:ENGINE_Ignition_#IGNITER_ID#

I’m assuming that to set these in SPAD you would have to use some scripted event, but it got me thinking. I wonder if it could be altered to set those values to the value of something you can alter, like an LVAR?

There are several related LVAR’s that are not used, but can be set. So perhaps that would be a workaround. Set the LVAR, which sets the value of the Bvar.

I’m not sure if these are actually setting these options or just controlling animations though.

1 Like

I put this together, at work so not tested, comparing the two examples, and copying it parrot fashion with the TBM930, and Shorts XML files to hand. This almost certainly doesn’t work because I have my syntax wrong. I’m not even sure if the LVAR I have chosen exists, but I doubt that part would be the issue here anyway.

All that said:

<!-- BBS Shorts LVAR to BVAR bridge -->
	<Component ID="LVAR_TO_BVAR">
		<UseTemplate Name ="ASOBO_GT_Update">
			<UPDATE_CODE>
				(L:TURBINE_IGNITION_SWITCH_SET1, Bool) (B:ENGINE_Ignition_#IGNITER_ID#, Number) != if{ (&gt;B:ENGINE_Ignition_#IGNITER_ID#_TOGGLE) }
			</UPDATE_CODE>
			<FREQUENCY>1</FREQUENCY>
		</UseTemplate>
	</Component>

The idea would be that you would set the Lvar to a value, and the value of the Bvar would be updated to match. The Lvar is arbitrary I believe, as long as it can be changed, and have a value set that matches what the Bvar expects.

Several things I’m unsure about, such as the “_Toggle” suffix. The DEICE example does not appear in the current 930 XML, so perhaps that code was accurate for back when that post was made, though there are other “_Toggle” K events present.

There are several “_TOGGLE” entries in the Shorts XML, but nothing to do with the igniters.

Perhaps in this instance you aren’t “toggling” a two pole switch, but “setting” a three position switch, so perhaps “_SET” instead?

So checking the SDK for the meaning behind “!=”, and “&gt’;” markups, “!=” may be what we want. We want to compare the value of the LVAR, with the value of the Bvar, and if they are not equal, set the Bvar to the value of the Lvar.

Maybe no need to compare at all, and just set it directly?

(L:TURBINE_IGNITION_SWITCH_SET1, Bool) 0 == if{ 0 (&gt;B:ENGINE_Ignition_#IGNITER_ID#_Set) }
2 Likes

EDIT: Since this got flagged and reported by the Shorts Dev as off-topic to his thread, mods moved this into this new thread. Out of context, this info makes no sense but it’s for the Shorts SD3 plane.

For the ignition, these BVARS work:

0·(>B:ENGINE_Ignition_1_Set) - sets switch up to normal
1·(>B:ENGINE_Ignition_1_Set) - sets switch to middle
2·(>B:ENGINE_Ignition_1_Set) - sets switch down to emergency

0·(>B:ENGINE_Ignition_2_Set) - sets switch up to normal
1·(>B:ENGINE_Ignition_2_Set) - sets switch to middle
2·(>B:ENGINE_Ignition_2_Set) - sets switch down to emergency

1 Like

EDIT: Since this got flagged and reported by the Shorts Dev as off-topic to his thread, mods moved this into this new thread. Out of context, this info makes no sense but it’s for the Shorts SD3 plane.

Here is the code for the LVAR to BVAR hooks. Obv, you can change the HOBAN part to whatever you want lol, but I like to make it unique so I can see more easily which LVARS I created with this hook. You mentioned not knowing if the LVAR exists you were setting, it shouldn’t exist before you set it here. You are making your own LVAR to use. Call it whatever you want.

(L:HOBAN_ENGINE_Ignition_1_Set, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ENGINE_Ignition_1_Set) 0 (&gt;L:HOBAN_ENGINE_Ignition_1_Set) }
(L:HOBAN_ENGINE_Ignition_2_Set, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ENGINE_Ignition_2_Set) 0 (&gt;L:HOBAN_ENGINE_Ignition_2_Set) }

This code subtracts 1 from what you set the LVAR per the TBM BVAR example link I posted earlier.

“When creating your custom event it’s important to offset the value by one from 0. This ensures the event only takes effect if the value is explicitly set by (whatever app). For example if the sim expects a value of 0 to turn something off and 1 to turn something on the custom event should instead take a value of 1 for off, 2 for on, and then subtract 1 from the provided value before passing it to the sim.”

In this case, you’d feed the custom LVAR 3,2,1 and it will pass 2,1,0 to the BVAR. Once it passes it on, the last step in that code is to reset the LVAR back to 0.

3·(>L:HOBAN_ENGINE_Ignition_1_Set,·Number)
2·(>L:HOBAN_ENGINE_Ignition_1_Set,·Number)
1·(>L:HOBAN_ENGINE_Ignition_1_Set,·Number)

3·(>L:HOBAN_ENGINE_Ignition_2_Set,·Number)
2·(>L:HOBAN_ENGINE_Ignition_2_Set,·Number)
1·(>L:HOBAN_ENGINE_Ignition_2_Set,·Number)

EDIT:

In case this is helps you ot maybe others searching, I wanted to be complete. The final step is to paste this in whatever interior.XML file is appropriate for the plane you are configuring. In my case, I tested on the 330 cargo.

Edit the BBS-Shorts-330-interior.xml file located in \blackbox-aircraft-shorts-regional\SimObjects\Airplanes\BlackBox-Shorts-Regional-330-Cargo\model

Paste this after line 42 which should be </Component>

	 <!-- BVar link ################################# -->
	<Component ID="LVAR_TO_BVAR">
		<UseTemplate Name="ASOBO_GT_Update">
			<UPDATE_CODE>
			(L:HOBAN_ENGINE_Ignition_1_Set, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ENGINE_Ignition_1_Set) 0 (&gt;L:HOBAN_ENGINE_Ignition_1_Set) }
			(L:HOBAN_ENGINE_Ignition_2_Set, Number) s0 0 &gt; if{ l0 1 - (&gt;B:ENGINE_Ignition_2_Set) 0 (&gt;L:HOBAN_ENGINE_Ignition_2_Set) }
			</UPDATE_CODE>
			<FREQUENCY>1</FREQUENCY>
		</UseTemplate>
	</Component>

The line after this block you pasted should be from the original file and read </Behaviors>.

1 Like

I was sure I had, but perhaps not as it seems to work okay. Still working on the sequence, but this seems to work so far.

There may be some kinks, but essentially if the autothrottle switch is off, then starter1 is turned on, then switched off when turned from START to BOTH. When autothrottle is on, starter2 is turned on, and turned off when switched to both.

Oddly the starter cockpit switch does not animate into the OFF position when turning them off, but it does for turning them on. Not going to worry about that though. I notice that the startup routine already turn the starters off automatically so I may remove those.

Switching the starter physical switch to OFF, disables the igniters, and resets the master starter switch to NORMAL.

I tried getting STARTER to work in the XML, and had no luck with it either, but the other two work great. There is a tiny delay between turning the physical switch, and the cockpit switch animating, but I guess that’s just the script processing.

Thanks again for your help! :+1: :clap:

1 Like

Didn’t Spad talk to bvars before? Did they remove it and add it back? Regardless, that’s great news for Spad users! It makes things a lot easier.

1 Like

Not sure. Talked about for sure, but perhaps only in the bleeding edge alphas, which I avoided, though did try out the betas for a while. In any case, they work really well.

Tried those out, and it works well. I also used these for the Pitot heat, and now they both work, and the switches animate!

image

image

I think that is a bug, where it sometimes shows them twice.

Relaunch SPAD, and you only see one of each again. Not sure what triggers this, but I’ve seen it before this version was released as well.

image

I got the update today. How do you find the B events?

None of my Condition Levers work now.

tia

You can set the values of Bvars. Some require a simple 0 or 1 but others are 0 to 100. Just like with LVAR’s really. Not sure about in Spad. I tested it with Axis & Ohs for a few different ones.

So many things that were either not possible or hacks are now possible simply. This was sorely needed and great news for the sim.

1 Like

I just figured it out

1 Like

The first time I came across this struggle was when the Twotter was released, and I had no way to adjust the overhead fuel cutoffs. At least I think it was the Twotter. Now we do.

It’s a huge improvement, and I really should thank them over on their discord.

Profiles for:

A2A Comanche
https://1drv.ms/u/s!AnFshfZAPNbjqC8IAg0qNiYMAxcY?e=wSSyX4

Black Square Caravan
https://1drv.ms/u/s!AnFshfZAPNbjqDDzi4opNSF38jay?e=36oeoA

BBS Shorts C23B
https://1drv.ms/u/s!AnFshfZAPNbjqC2eytw2m55oPhLp?e=dr1SdX

1 Like

Do you know if there will be profiles for the BKSQ Bonanza, Baron and TMB850?

I have the Bonanza, and Baron, but haven’t flown them much. I have profiles them, but they probably aren’t that well developed. I’ll take a look at the Bonanza one tomorrow. It will be nice to fly something different for a while.

What I tend to do is make some little tweak to one of them, and then have to retrofit that to the other profiles., where applicable.

Examples would be holding down the NAV key to switch GPS/VLOC, and holding ALT to arm altitude capture. I don’t have a key to enable OBS so will probably use BC as I have never used that function.

1 Like

One of my biggest complaints was not being able to access Bvars, which meant I could set an event that would work, but would not get animation. It may seem like a small thing, but I want to see a switch move in the cockpit to give me visual feedback.
So happy to see (at least some) Bvars exposed now.

1 Like

Re-factored Black Square TC Bonanza profile. Not perfect but then none of mine are. :slight_smile:

https://1drv.ms/u/s!AnFshfZAPNbjp2GuCN_m1TdUfqL8?e=5moW5V

  • Hold NAV to switch between NAV/GPS.
  • Holding AP toggles FD, but only if the AP is disabled first.
  • Pressing IAS toggles OBS mode.
  • Autothrottle is used to switch between NAV1 & NAV2 controls, making tuning two VOR’s nice, and easy.
  • Using Bvars to enable certain switches, like the AP buttons, and oddly the propeller de-ice switch, the only one of that cluster of switches that required it. I couldn’t find one for the AP & FD buttons though, but they do work.
  • Holding XFER button switches from 25KHz/8.33Khz modes

Some of these I have not used on other profiles, like OBS, so would need to add those. Others are relevant only to this plane.

1 Like

I’ve been playing around with GNS 530 controls. These seem to be working quite nicely.

Not complete but it is enough to navigate the menus, go into sub-pages, and CLR out of them.

I used the DME setting for both radio controls to do this, bottom XFER button is for ENT, and CLR, and the top is for GPS push, and Direct To.

Oddly, I couldn’t find a Bvar for right knob push, so this one doesn’t animate, but does work.

1 Like

You don’t need any Bvars for full GNS control. Been controlling the GNS way before this new Bvar access. From memory they are just standard H: events and there is one for every action including the push. I can dig out any you can’t establish. Just shout if you need any.

1 Like

Yes, I tried those. I believe they worked, but they don’t animate the switches in VC. The Bvars do both the action, and the animation.

A2A Comanche profile updated to include ADF tuning & transfer, and some GNS 530 functionality.
https://1drv.ms/u/s!AnFshfZAPNbjqC8IAg0qNiYMAxcY?e=wSSyX4