Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post any technical issues here. This forum gets priority from our staff.
dromer1967
Airman
Posts: 22
Joined: 29 Jun 2019, 07:51
Contact:

Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by dromer1967 »

I hope someone can help me with this. I have the lvars document for the 172 but it doesn't (seem to?) tell which lvars can be used to show the current state of the auto pilot.

With the document I know that I can turn on the auto pilot and push the buttons, for example kap140_hdg_button=1, kap140_hdg=1, kap140_hdg_button=0 to enable HDG mode.

But how can I tell that HDG mode is active? The above lvars only activate it, they do not show that it is active. I first thought that kap140_hdg_button was to activate it and kap140_hdg to show the state. But this does not seem the case.

Does anyone know which lvars to use? I need this information for the auto pilot so I can enable the corresponding LEDs on the Honeycomb Bravo.

Thanks
Peter

OGfishm0nger
Airman
Posts: 43
Joined: 25 Feb 2018, 18:07

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by OGfishm0nger »

After having tried to figure this out myself I discovered that it is not currently possible to do this, per this very old thread.

You can read whether or not the AP is engaged at all with the P3D variable AUTOPILOT MASTER which is what I'm using to light the Auto Pilot button LED. As far as the others go I've resigned myself to having no other AP LED's on the 172 (and I'm guessing same for the 182).

dromer1967
Airman
Posts: 22
Joined: 29 Jun 2019, 07:51
Contact:

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by dromer1967 »

Well, that's..... quite unfortunate 8)

Since the thread you are referring to is about 8 years old now, thanks for pointing it out to me by the way, I guess we shouldn't count on A2A to make it happen any more.

I think I shall have a go at it myself by keeping the state of the AP through registering all AP button presses. I'm afraid that chances are that it will get out of sync if any clicks are missed. But since the state can be reset every time the AP is disabled (at least I hope it can?) I hope it will be manageable. And since there is no alternative I shall at least try this 'solution' :)

OGfishm0nger
Airman
Posts: 43
Joined: 25 Feb 2018, 18:07

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by OGfishm0nger »

I'd love to hear how this works out for you! I had given that some consideration myself but wasn't sure I'd be able to keep it entirely in sync and wasn't sure it was worth the effort for me at this point.

Best of luck!

dromer1967
Airman
Posts: 22
Joined: 29 Jun 2019, 07:51
Contact:

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by dromer1967 »

OGfishm0nger wrote: 06 Apr 2021, 19:12 I'd love to hear how this works out for you! I had given that some consideration myself but wasn't sure I'd be able to keep it entirely in sync and wasn't sure it was worth the effort for me at this point.

Best of luck!
I am no expert on the autopilot but I think it isn't possible to keep it in sync :cry:

For example the following scenario
  • Enable the autopilot; It will go to wings level and vs mode
  • Press ALT and it will go to altitude hold
  • Now dial in an altitude; it will now arm for that altitude
  • Press ALT again to go to VS mode and Enter the vertical speed
  • The aircraft will now go to the selected altitude with the selected vertical speed
  • When the altitude has been reached it will automatically go to ALT mode
And there you have it. The AP is now in ALT mode but I don't know that it is. So sync is lost because the program would still think it is in VS mode.

Haven't got a clue how I can prevent this.

OGfishm0nger
Airman
Posts: 43
Joined: 25 Feb 2018, 18:07

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by OGfishm0nger »

Yeah that's what I was afraid of was those types of situations. It was so easy setting up the S-TEC autopilot for the Cherokee because you can get exact state information at all times.

Maybe A2A will someday make the change so we can do that with the KAP140 as well ***HINT HINT*** :D

dromer1967
Airman
Posts: 22
Joined: 29 Jun 2019, 07:51
Contact:

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by dromer1967 »

Well like I said, the post you mentioned is 8 years old. So I don't think A2A will do anything about it any more. So long for service 8)

I was wondering which aircraft I should buy after the 172. And if it should be from A2A at all since I do want to use my entire Bravo Throttle. I believe the 182 has the same issues as the 172.

So perhaps a step up would be Chreokee which does have state information as you say.

Do you know if the Bonanzo also has the state information or the Comanche? Or is it like the 172/182? I think the Bonanza/Comanche would be my start in more complex aircraft but only if it can support the Bravo.

Have to investigate further what the desired aircraft sequence would be for learning other aircraft than the 172 :)

OGfishm0nger
Airman
Posts: 43
Joined: 25 Feb 2018, 18:07

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by OGfishm0nger »

The Comanche should since it uses the same S-TEC autopilot that is in the Cherokee. For the Cherokee I just used the S-TEC indicator lights to get status information to control the Bravo LED's. I haven't started configuring the Honeycomb for the Comanche but I'm expecting it will behave similarly. I've posted my Alpha and Bravo profiles for the Cherokee in this thread if you want to look at that for some insight into how you can set up the Bravo.

The functionality of the S-TEC is quite different from the KAP140 so keep that in mind. The buttons/LED's on the Bravo don't always have an appropriate counterpart on the S-TEC. For example, there is no REV mode or VS hold on the S-TEC.

I have more experience in the Cherokee than I do in the Comanche (which I haven't flown since I moved from FSX to P3D years ago), but both are very fun to fly.

I have the Bonanza but have barely touched it so I can't comment on how readable the AP status is from my own experience. Looking at the profile linked in this thread it looks like the status is readable though.

KevinKaessmann
Airman Basic
Posts: 7
Joined: 06 Mar 2016, 05:41

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by KevinKaessmann »

Just an idea: why not remember yourself the state of the autopilot ?
I assume you use FSUIPC ? And LUAs ?

I do this for some aircraft with a 3-position switch while my Tact&Toggle has only 2-position switches.
As I switch with FSUIPC LUA scripts, I assume a starting position of "Off".
Switching means:
- setting the aircraft switch position (0..2)
- remember the switch position in the "FSX user area".
swi2all=0x12 -- Switch 2 ALL
ipc.writeUB(0x66C0,swi2all) -- Write Switch 2 ALL to FSX User Area
- if the LUA script is called again, I read the former value:
swi2pos=ipc.readUB(0x66C0) -- Read Position Switch 2 from FSX User Area

As I only use my Tact&Toggle with these LUA scripts and the FSX user area is initialized to zeroes at P3D start,
it works very well for me.

dromer1967
Airman
Posts: 22
Joined: 29 Jun 2019, 07:51
Contact:

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by dromer1967 »

KevinKaessmann wrote: 10 Apr 2021, 13:44 Just an idea: why not remember yourself the state of the autopilot ?
I assume you use FSUIPC ? And LUAs ?
Hi Kevin,

The reason why I can't do that is in a previous post from me in this thread.

I cán remember the state of action I take, but since I don't see the status of the autopilot I can't remember actions that the autopilot takes. So it gets out of sync.

dromer1967
Airman
Posts: 22
Joined: 29 Jun 2019, 07:51
Contact:

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by dromer1967 »

OGfishm0nger wrote: 10 Apr 2021, 12:58 The Comanche should since it uses the same S-TEC autopilot that is in the Cherokee. For the Cherokee I just used the S-TEC indicator lights to get status information to control the Bravo LED's. I haven't started configuring the Honeycomb for the Comanche but I'm expecting it will behave similarly. I've posted my Alpha and Bravo profiles for the Cherokee in this thread if you want to look at that for some insight into how you can set up the Bravo.

The functionality of the S-TEC is quite different from the KAP140 so keep that in mind. The buttons/LED's on the Bravo don't always have an appropriate counterpart on the S-TEC. For example, there is no REV mode or VS hold on the S-TEC.

I have more experience in the Cherokee than I do in the Comanche (which I haven't flown since I moved from FSX to P3D years ago), but both are very fun to fly.

I have the Bonanza but have barely touched it so I can't comment on how readable the AP status is from my own experience. Looking at the profile linked in this thread it looks like the status is readable though.
I saw your post! I used (parts of) it as the basis for the Configurator Profile I made for the 172. I couldn't figure out the LEDs then and now I know why :lol:

So it seems that only the 172 and 182 do not have readable auto pilot state.

JT59
Airman Basic
Posts: 2
Joined: 13 Mar 2017, 18:40

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by JT59 »

OGfishm0nger wrote: 05 Apr 2021, 15:13 After having tried to figure this out myself I discovered that it is not currently possible to do this, per this very old thread.

You can read whether or not the AP is engaged at all with the P3D variable AUTOPILOT MASTER which is what I'm using to light the Auto Pilot button LED. As far as the others go I've resigned myself to having no other AP LED's on the 172 (and I'm guessing same for the 182).
I can confirm the same is true for the A2A C182 kap140 after spending a long time logging Lvars to find one somewhere that gives the kap140 status, unsuccessfully, for the Honeycomb Bravo leds and now know why. Thanks for the discussion here as it saved me spending yet more time on it.

So question for A2A, why not provide a 172/182 update that provides the kap140 status Lvars, considering this and the other posts out there still realizing the need (8 years later)? The Bravo and the like expand the need beyond the home-built cockpits. I have to believe enough 172/182's sold to make it a worthwhile update. Any chance for that? Thanks for the great products, and it would be a well received enhancement to a fantastic sim of the kap140.

dromer1967
Airman
Posts: 22
Joined: 29 Jun 2019, 07:51
Contact:

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by dromer1967 »

JT59 wrote: 27 Apr 2021, 10:40 I can confirm the same is true for the A2A C182 kap140 after spending a long time logging Lvars to find one somewhere that gives the kap140 status, unsuccessfully, for the Honeycomb Bravo leds and now know why. Thanks for the discussion here as it saved me spending yet more time on it.
At least now I am sure that I won't be buying the C182 since I don't want to use any other aircrafts that do not support the Bravo :roll:

User avatar
some1 - A2A
A2A Lieutenant Colonel
Posts: 1828
Joined: 03 Aug 2008, 11:56

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by some1 - A2A »

Hello guys,

here is the link to a new autopilot DLL for you to test.
https://a2asimulations.com/updates/test ... update.zip

The new variables are:

Code: Select all

0 - 1 flags variables:
kap140_isAPflag
kap140_isHPAflag
kap140_isInhgFlag
kap140_isFPMflag
kap140_isFTflag
kap140_isPTflag
kap140_isYDflag
kap140_isAlertFlag

Lateral Modes variables:
kap140_activeLateral
kap140_standbyLateral

Vertical Modes variables:
kap140_activeVertical
kap140_standbyVertical

Possible values for lateral modes:
OFF = 0
ROL = 1
HDG = 2
NAV = 3
APR = 4
REV = 5
GS = 6

Possible values for vertical modes:
OFF = 0
VS = 1
ALT = 2
GS = 3
Michael Krawczyk

OGfishm0nger
Airman
Posts: 43
Joined: 25 Feb 2018, 18:07

Re: Which LVars to use to get the current state of the K140 auto pilot (to enable the leds on the Honeycomb Bravo)

Post by OGfishm0nger »

Oh wow that's great! :D :D :D

I'll test these out when I get a chance this weekend!

This is very much appreciated!

new reply

Return to “C172 Trainer Tech Support”

Who is online

Users browsing this forum: No registered users and 13 guests