Bus Connections

Peer support for Air Manager desktop users

Moderators: russ, Ralph

Post Reply
Message
Author
The Artful Dodger
Posts: 204
Joined: Sat Jul 09, 2022 3:20 pm

Bus Connections

#1 Post by The Artful Dodger »

Hello, All:
I am trying the seemingly impossible - at least so far - I am trying to add an autopilot to the Cessna 152! Why you ask? Because I'm trying to build an MCP in AM and I need something to test it on. I can't use an airplane that already has one so, since I've "flown" the 152, it's a natural selection.
Enough of the background; In order to "install" an Autopilot on any airplane, I presume you must power it up. I've made several changes to the "systems.cfg" file (allowing an autopilot - [autopilot] section) but that wasn't enough. So, I've tinkered around in the [electrical] section, added a connection but it still doesn't work. So to my question.
I want to trace the power around the airplane so I need to find out the syntax for, for example, the "BUS LOOKUP INDEX". It's reference is: "This is a settable simvar meaning that it can both be read and set. Some of the simvars in this list are using this to lookup a value using two arguments (one argument in addition to the component index). For example to check the state of the connection between a "circuit.45" and the "bus.2" it would be written as follows:
2 (>A:BUS LOOKUP INDEX, Number) (A:CIRCUIT CONNECTION ON:45, Bool)". What I want to know is how to state something like circuit.34, & bus.2 in the form of fs2020_variable_subscribe(?)?
I am bound to make this work but I am stymied at the moment so any assistance would be most appreciated.

Sparky

Tetrachromat
Posts: 236
Joined: Sun Feb 14, 2021 6:55 pm

Re: Bus Connections

#2 Post by Tetrachromat »

Don't use variable subscribe, you must use variable write for switching connections!

The Artful Dodger
Posts: 204
Joined: Sat Jul 09, 2022 3:20 pm

Re: Bus Connections

#3 Post by The Artful Dodger »

I first want to see if what I've done is done correctly. But before I can do that I need to find out the correct syntax for using the "BUS LOOKUP INDEX".
What you say is normally true, but not in this case because, as the site says, "This is a settable simvar".

Sparky

User avatar
Crunchmeister
Posts: 222
Joined: Tue Aug 10, 2021 2:06 pm

Re: Bus Connections

#4 Post by Crunchmeister »

The Artful Dodger wrote: Tue Nov 29, 2022 3:41 pm Hello, All:
I am trying the seemingly impossible - at least so far - I am trying to add an autopilot to the Cessna 152!
Rather than trying to shoehorn an AP into a plane that doesn't have one via Air Manager, you should probably look into the JPLogistics C152 mod over on flightsim.to. It adds a bunch of nice enhancements including a KAP-140 AP unit to the base plane that you can just tie into with standard AP events and vars like any other plane.


https://flightsim.to/file/2246/jplogist ... cement-mod
- Ryzen 5950x, 64GB 3600MHz RAM, RTX3070Ti

Simstrumentation Instrument dev
Free Air Manager instruments for MSFS available at http://www.simstrumentation.com

The Artful Dodger
Posts: 204
Joined: Sat Jul 09, 2022 3:20 pm

Re: Bus Connections

#5 Post by The Artful Dodger »

Thank you for the suggestion and I will have a look at it but I want to do it for my own edification.

Sparky

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Bus Connections

#6 Post by Sling »

You can’t currently do the bus query listed in the MSFS SDK because it’s not supported in AM yet. Corjan has promised to add something for this in AM4.2. In the mean time you can try doing it by writing and reading the vars concerned but I can tell you it’s not wholly reliable doing this which is why we need the correct query.

Post Reply