CAPTAIN SIM FORUM
757 Captain III >> 757 Captain III - General >> SDK, LVAR, custom key mapping etc
https://www.captainsim.org/forum/csf.pl?num=1522250884

Message started by zulukilo on Mar 28th, 2018 at 3:28pm

Title: SDK, LVAR, custom key mapping etc
Post by zulukilo on Mar 28th, 2018 at 3:28pm
Hi all,

I was wondering if anyone has access to the LVAR data for the 757 Captain III? I would like to use it with LINDA and the VRInsight MCP and create a relevant file for it.

I have used SPAD.neXt to get some LVAR data, but would really appreciate a full list so I can make relevant assignments as easy as possible.

Would Captain Sim be able to help me out with this too? Many thanks for such a fantastic product!

Best regards,

Pete

Title: Re: 757 Captain III LVAR Assignments
Post by Thantheleon on Mar 28th, 2018 at 7:04pm
Thank you.
We'll release the 757 SDK after the 1.1 is out.

Title: Re: 757 Captain III LVAR Assignments
Post by zulukilo on Mar 28th, 2018 at 7:30pm
Hi there,

Many thanks! I have managed to track the LVAR data and work with it. I will also wait for the SDK from 1.1.

Best regards,

Pete  :)

Title: Captain Sim 757 III LVar/Offset help with MCP
Post by zulukilo on Mar 31st, 2018 at 9:56am
Hi all,

I have been able to hunt for all LVars and have successfully been able to program all buttons on the MCP. However, I am having real trouble with assigning LVar data to dials. Could someone please help?

I am attempting to make a module and release it (with the permission of Captain Sim) for VR Insight users to add that extra dimension when flying.

I have managed to assign buttons with LVar data, but dials (SPD/IAS, HDG, V/S and ALT) don't seem to work. (Captain Sim Developers) Have you used offsets instead and is there any way you could tell me what they are? Possibly send a quick message over to me? (I have two weeks off from work so have some time to write some code).

Many thanks for any help. It's greatly appreciated as I'm 100% into this aircraft! It's amazing!! A big thank you! :)

Pete :)

Title: Re: SDK, LVAR etc
Post by Thantheleon on Mar 31st, 2018 at 1:08pm
Thanks again.
SDK will explain all of that.
After the 1.1. 

Title: Re: SDK, LVAR etc
Post by zulukilo on Mar 31st, 2018 at 4:08pm
That's great! Many thanks for your help. Do you need anyone to beta test the SDK and 1.1? I'm sure you get asked that a lot, but i can invest quite a bit of time into creating a control module for VRi.

Many thanks for all of your hard work :)

Pete

Title: Re: SDK, LVAR etc
Post by zulukilo on Apr 3rd, 2018 at 11:29am
Hi Thantheleon,

Please could you put me out of my misery hehe...

Are the IAS, HDG, V/S and ALT commands run through FSX/P3D commands or Lvars?

When dialling, I am able to find Lvars. Lvars also exist in the panel.cfg. However, the only way to get any of the dials moving is through direct FSX/P3D assignments. The assignment of Lvars just doesn't seem to do anything (I can get dial animations, but that's it...)

Please, please, please help  :)

Thank you,

Pete

Title: The 1.1 manual and SDK
Post by Thantheleon on May 28th, 2018 at 8:54pm
Captains,
The 757 manual is updated.
Now it includes SDK and the upcoming 1.1 features description.

Available via the 757 Sim Ops as usual: https://captainsim.net/products/y757/sops/

Title: Re: The 1.1 manual and SDK
Post by Skipy on May 28th, 2018 at 9:49pm
Hi,

Thanks for this long awaited SDK manual. I can now finish my LUA script to be able to "click" on buttons :-).

Just a question. In the SDK it is written that we can find the object lists on related "maps" = JPG files. Where are they?

Regards, Skip.

Title: Re: The 1.1 manual and SDK
Post by Tanya on May 29th, 2018 at 5:09am
Added JPG files to the Manuals folder, please redownload it. We are sorry for the inconvenience. 

Title: Re: The 1.1 manual and SDK
Post by Skipy on May 29th, 2018 at 9:15pm

Captain Sim 2 wrote on May 29th, 2018 at 5:09am:
Added JPG files to the Manuals folder, please redownload it. We are sorry for the inconvenience. 


Ok got them thank you. I was able to complete my VRi MCP Lua script (I didn't know how to simulate clicks...). I suppose that CS737 for P3D4 won't have the same SDK? Because I didn't find how to manage HDG bug via Lvars...

Skip.

Title: Re: The 1.1 manual and SDK
Post by Thantheleon on May 29th, 2018 at 11:33pm

Skipy wrote on May 29th, 2018 at 9:15pm:
I suppose that CS737 for P3D4 won't have the same SDK? Because I didn't find how to manage HDG bug via Lvars...

Same concept but different IDs obviously.
For the 737 try the numbers from the 737 manual. They should match the code.

Title: Re: The 1.1 manual and SDK
Post by Skipy on May 30th, 2018 at 5:58am

Captain Sim wrote on May 29th, 2018 at 11:33pm:

Skipy wrote on May 29th, 2018 at 9:15pm:
I suppose that CS737 for P3D4 won't have the same SDK? Because I didn't find how to manage HDG bug via Lvars...

Same concept but different IDs obviously.
For the 737 try the numbers from the 737 manual. They should match the code.


Well I tried this command to rotate HDG without any result:
     ipc.writeLvar ("L:klid", 2207005)

BTW I can use specific "_C" ending lvars to simulate click on buttons but on HDG bug I have to "unclick" not to have the knob turning without stopping.
     ipc.writeLvar ("L07_005_KNOB_C", 1)
     ipc.sleep(2)
     ipc.writeLvar ("L07_005_KNOB_C", 0)

And this method is not working well of course... Any CS737 programmer to contact?

Title: Re: The 1.1 manual and SDK
Post by Thantheleon on May 30th, 2018 at 3:05pm

Skipy wrote on May 30th, 2018 at 5:58am:

And this method is not working well of course... Any CS737 programmer to contact?

The 737 just needs a SDK. On the list.

Title: Re: The 1.1 manual and SDK
Post by Walker605 on Jun 2nd, 2018 at 4:56pm
Hey Everyone! I am posting my to this topic at the request of the support team. See below:

"I programmed the MCP Autopilot buttons to work with saitek multi panel through the SPAD.next application using the newly released SDK. The button on the autopilot do not funtion properly when programed this way. I tried to use LUA scripts as well and the same issue. The buttons work as intended when using the mouse. The buttons on the 757 MCP get stuck in the pressed position when toggled by the saitek panel. I have set them up per the instructions of the manual provided with the sdk. I tried a set parameter to 1, toggle parameter to 1 and 0 as well. None of these activate the button like a mouse click would.
It happens anytime while using a saitek multi panel to control Autopilot functions.
When using a mouse to select V/S button it presses in momentarily and then release with the button being highlighted. WHen the saitek panel VS button is pushed the V/S button in sim sticks in the pressed in position. If I toggle it again via the Siatek panel it releases, but does not activate. I have read the momentary switch/button section of the manual as well. Do I need to make a video or set of pictures for you?"

Regards

Mike 'Walker605' Allen

Title: Re: The 1.1 manual and SDK
Post by Thantheleon on Jun 4th, 2018 at 9:42pm

Walker605 wrote on Jun 2nd, 2018 at 4:56pm:

"I programmed the MCP Autopilot buttons to work with saitek multi panel through the SPAD.next application using the newly released SDK. The button on the autopilot do not funtion properly when programed this way. I tried to use LUA scripts as well and the same issue. The buttons work as intended when using the mouse. The buttons on the 757 MCP get stuck in the pressed position when toggled by the saitek panel. I have set them up per the instructions of the manual provided with the sdk. I tried a set parameter to 1, toggle parameter to 1 and 0 as well. None of these activate the button like a mouse click would.
It happens anytime while using a saitek multi panel to control Autopilot functions.
When using a mouse to select V/S button it presses in momentarily and then release with the button being highlighted. WHen the saitek panel VS button is pushed the V/S button in sim sticks in the pressed in position. If I toggle it again via the Siatek panel it releases, but does not activate. I have read the momentary switch/button section of the manual as well. Do I need to make a video or set of pictures for you?"


Unfortunately we cannot debug third party developments. We've provided all the IDs and the general structure. The rest is upon your programmer's experience/luck.

Title: Momentary Action Switches
Post by JasonPC on Jul 18th, 2018 at 3:09am
Can someone explain the SDK manual a little bit to me.

I am trying to simulate clicking the LNAV button.

The LVAR for it is G03_011_BUT

according to the manual to convert this to an ID

first take out underscores G03011 then G = 17 so the ID is 1703011

This is where I struggle to get this to work.

Set the ID to the L:KLID variable

So basically I should write the LVAR variable to 1703011? tried this but having no luck.

Never mind I figured it out. The is an LVAR NAMED KLID that I need to set to trigger the button. Got it working!

Title: Re: SDK, LVAR, custom key mapping etc
Post by coqui on Sep 22nd, 2018 at 11:28pm
Can anybody help on how to use the SDK and the LVARS ?
Any tutorial? Thanks

Title: Request event ID's for some buttons/levers
Post by Scholli04 on Nov 12th, 2018 at 11:25pm
Hi guys,

I'd like to map some of the 757's buttons and switches to my thrust lever quadrant.
Could you tell me the event ID's for the following please?

TOGA Button
A/T Instinctive Disconnect button (not the default FS command, the one on the actual thrust lever)
L/R Fuel Control Switches RUN/CUTOFF

I've tried LINDA, but can not really figure out how to develop my own preset.
This is what I put in, but whenever I try to save an assignment with this it simply deletes it again (I guess I screwed up the code):

function CS_ATDISC_TOGGLE ()
     ipc.writeLvar("P05_008_BUT",1)
end

function CS_FUELCTLR_OFF()
     ipc.writeLvar("P05_019_SW2",0)
end

function CS_FUELCTLR_ON()
     ipc.writeLvar("P05_019_SW2",1)
end

function CS_FUELCTLL_ON()
    ipc.writeLvar("P05_018_SW2",1)
end

function CS_FUELCTLL_OFF()
    ipc.writeLvar("P05_018_SW2",0)
end

Any help on how to get these assignments done?

It would of course be much easier if you could simply tell me the event ID's for the initially mentioned switches, so that I can do a simple assignment via FSUIPC rather than having to fiddle with LINDA (which I am completly new to).

Title: Re: Request event ID's for some buttons/levers
Post by Markoz on Nov 13th, 2018 at 1:22am
The SDK, that is included with the 757 III manuals (CS757CAPTAINIII_MANUAL_PART6_06.pdf), explains how to do what you want to do.

Title: Re: Request event ID's for some buttons/levers
Post by Scholli04 on Nov 13th, 2018 at 8:01am
I looked at the SDK; but for some reason what I tried did not work.

I posted the code in the .lua file above, but I'm not a programmer, so I'm not too sure about it.
Can you help me with it Mark?

Title: SDK Question
Post by matta757 on Jan 1st, 2019 at 12:05am
Hi all,

I just joined the forum because I am looking into purchasing the CS 757 to replace my 767 from another, unnamed company  ;). I have a full fixed base simulator with all actual 757 gauges and panels. I am currently interfacing all of this real hardware using the other SDK and a combination of Arduino and Cockpit Concept ARINC 429 cards.

I have some questions about the SDK that is available for the CS 757. First of all, let me say that the product looks simply spectacular. The attention to detail on things like the fonts on the CRT screens is second to none. And coming from that 767, you can understand what a huge improvement something like the fonts could be.

So here's my first question... I have a real 757 MCP. I have been looking over the CS 757 SDK and I can't seem to tell for sure whether or not it will allow me to WRITE a numeric value from the digits on the real MCP to a value in the CS 757 MCP. This includes the IAS/MACH, HDG, V/S, and ALT windows. Can someone please confirm whether or not values can be written from my panel to the software? I'll be clear in saying that I know how to convert the data coming out of the real MCP into data flight sim can understand (I have done it with the 767 already). I just need to know if the CS 757 SDK gives me the capability to write those values to it.

By the same token, can it go the other way? Does the SDK give me the capability to read the value of the digits on the MCP? This would be necessary for situations like the LOC capture when the heading value changes automatically to the runway heading, I need to know if I can READ that value from the software and then convert it to code the real MCP understands. Again, my question is not how do I convert the value to a code the MCP understands, just whether or not I can read that value through the SDK.

Wow, that was long winded, but I wanted to make sure I was clear in asking my questions. Any help would be greatly appreciated.

Thank you,
Matt

Title: Re: SDK Question
Post by Captain Sim on Jan 1st, 2019 at 4:41pm
Thanks!


matta757 wrote on Jan 1st, 2019 at 12:05am:

So here's my first question... I have a real 757 MCP. I have been looking over the CS 757 SDK and I can't seem to tell for sure whether or not it will allow me to WRITE a numeric value from the digits on the real MCP to a value in the CS 757 MCP. This includes the IAS/MACH, HDG, V/S, and ALT windows.

All values on the software MCP are results of its internal calculations. You cant (well you could but you shouldn't) just overwrite the numbers by some random ones from an external hardware.


Quote:

By the same token, can it go the other way? Does the SDK give me the capability to read the value of the digits on the MCP?

Yes. And this is the way to go if you wish to synchronize the hardware and software MCP. Given that the software is always a master (main and self-sufficient unit), the hardware is a servant (just an extra input-output interface).

Title: Re: SDK Question
Post by matta757 on Jan 1st, 2019 at 5:42pm

Captain Sim wrote on Jan 1st, 2019 at 4:41pm:
Thanks!


matta757 wrote on Jan 1st, 2019 at 12:05am:

So here's my first question... I have a real 757 MCP. I have been looking over the CS 757 SDK and I can't seem to tell for sure whether or not it will allow me to WRITE a numeric value from the digits on the real MCP to a value in the CS 757 MCP. This includes the IAS/MACH, HDG, V/S, and ALT windows.

All values on the software MCP are results of its internal calculations. You cant (well you could but you shouldn't) just overwrite the numbers by some random ones from an external hardware.


Quote:

By the same token, can it go the other way? Does the SDK give me the capability to read the value of the digits on the MCP?

Yes. And this is the way to go if you wish to synchronize the hardware and software MCP. Given that the software is always a master (main and self-sufficient unit), the hardware is a servant (just an extra input-output interface).


Thank you for your reply. With all due respect, I was not talking about using random numbers to overwrite the values on the MCP.

I am talking about using a REAL MCP to set the values on the software MCP. Say that I want to set an altitude of 25,000 on the MCP. I would turn my real MCP to show 25,000 but somehow that value needs to be written to the sim software so that it will set the altitude value in the software MCP to 25,000. If I am not supposed to write "random" numbers to the software, how exactly is one supposed to take the value set on a real MCP and set that in the sim?

Other SDK's that I have seen (including the one for the LVLD767) have variables that are read, writable, or both read/write. The MCP values are an example of a read/write variable because they need to be modified by both the software but also by any hardware. I am confused by the second part of your response saying that the hardware being a slave to the software. At some point, the software also needs to listen to the hardware in order to set the MCP values.

Thank you for your insights.

Matt

Title: Re: SDK Question
Post by Captain Sim on Jan 1st, 2019 at 5:53pm

matta757 wrote on Jan 1st, 2019 at 5:42pm:

I am talking about using a REAL MCP to set the values on the software MCP.

The real MCP is just an extra input-output device same as any flightsim hardware.

Title: Re: SDK Question
Post by Captain Sim on Jan 1st, 2019 at 5:57pm

matta757 wrote on Jan 1st, 2019 at 5:42pm:
I am confused by the second part of your response saying that the hardware being a slave to the software.

I said "to synchronize" not "to slave".

Title: Re: SDK Question
Post by matta757 on Jan 1st, 2019 at 6:00pm

Captain Sim wrote on Jan 1st, 2019 at 5:53pm:

matta757 wrote on Jan 1st, 2019 at 5:42pm:

I am talking about using a REAL MCP to set the values on the software MCP.

The real MCP is just an extra input-output device same as any flightsim hardware.


I understand that but obviously I am confused about how such a device communicates with the CS SDK. Can you please elaborate a little more on how exactly the SDK takes the data from the MCP and sets it in the software? I am not an expert at this and am having some difficulty seeing how it works if there is not a writable offset in the SDK.

Thank you,
Matt

Title: Re: SDK Question
Post by Captain Sim on Jan 1st, 2019 at 6:24pm

matta757 wrote on Jan 1st, 2019 at 6:00pm:
Can you please elaborate a little more on how exactly the SDK takes the data from the MCP and sets it in the software?

Unfortunately we cannot support third party developments. We've provided all the IDs and the general structure. The rest is upon your programmer's experience/luck.

Title: Assigning a button for TOGA
Post by Hazzanz on Jun 26th, 2019 at 1:09pm
Hi All,
I am struggling to get this setup. I am using Spad.Next and have managed to program just about everything I need. The one main one I need to add is TOGA. I have used KLID for most things but I cannot figure out how to enter a TOGA button push from the example in the SDK Manual:
E.g. to press the G02_003_BUT:
(L:G02_003_BUT) = 1

Has anyone got any ideas?

Title: Re: Assigning a button for TOGA
Post by Airlnkr on Jul 22nd, 2019 at 2:48pm
I can't help but what I can tell you is that there is no TOGA button on the 757....There are Go Around Paddles on the Throttle Quadrant but in the real world we run the Throttles to somewhere around 40% N1/ 1.02 EPR and then Engage the EPR/N1 button on the MCP....@ 1000ft AGL you select CLB on the thrust panel in front of the FO...in Europe or Noise Abatement Departures you select CLB at 1500 and begin Flap Retraction at 3k AGL

Title: Re: Assigning a button for TOGA
Post by JasonPC on Jul 27th, 2019 at 3:39am

Hazzanz wrote on Jun 26th, 2019 at 1:09pm:
Hi All,
I am struggling to get this setup. I am using Spad.Next and have managed to program just about everything I need. The one main one I need to add is TOGA. I have used KLID for most things but I cannot figure out how to enter a TOGA button push from the example in the SDK Manual:
E.g. to press the G02_003_BUT:
(L:G02_003_BUT) = 1

Has anyone got any ideas?


You have to set LVAR KLID = 1703007 to engage the EPR button

Title: Set altimeter/baro L:Var
Post by dalpi on Mar 12th, 2020 at 2:52pm
Hello everybody!

I'm using the L:Vars to interface real 757/767 hardware which works quite nicely. Currently I'm working on the altimeter and I want to set the altimeter/baro value directly instead of using a knob (rotary) action. Is this possible? I tried sending absolute values to both hPa and inHg variables, as well as to the knob L:Var without success.

Best regards,

Chris

Title: Re: SDK, LVAR, custom key mapping etc
Post by dalpi on Mar 19th, 2020 at 10:01am
Hi all,

was there any success writing directly absolute values to the MCP? As mentioned above I can't write absolute values to the altimeter's baro.
While an altimeter change through FSUIPC changes all 3 baros at once, I want to change the Captain and FO altimeter settings separately.

Chris

Title: How to get the IND out of the CS757 SDK
Post by Kees on Apr 20th, 2020 at 9:13am
Hi,

For the 7 segment displays i would use the IND's from the CS757 SDK. But how should I use them, interprete them? For example If i would to assign the 7-segment displays in my MCP regarding the IAS, I have to use the G03_001_IND. But where can I find the parameters of this VAR?

Kind regards,
Kees Schroijen

Title: Re: SDK, LVAR, custom key mapping etc
Post by Kees on Apr 21st, 2020 at 8:33am
Hi,

I solved my problem i mentioned erlier, but now my next problem.

If i turn the hdg Knob in my own build MCP, I would like that the display of the hdg on the MCP also increases or decreases. So if the heading in the CS757 MCP says 090 and on my own mcp i turn the knob counterwise, the heading on the mcp in the panel of teh CS757 should increase. I have allready written to L:klid = 1703002, but that doesn't do the job.

Kind regards,
Kees Schroijen

Title: Re: SDK, LVAR, custom key mapping etc
Post by Markoz on Apr 21st, 2020 at 1:13pm
From the SDK:

FOR KNOBS ( _KNO)

1. Convert the element's name into an ID number.
2. Add the - (minus) for counterclockwise rotation.

For example:

(L:klid) = 1702003 - clockwise rotation.
(L:klid) = -1702003 - counterclockwise rotation.

So would the above from the SDK mean L:1702003 is clockwise rotation, and L:-1702003 is counterclockwise rotation?

If so, could this mean you need to use L:1703002 for clockwise rotation, and L:-1703002 for counterclockwise rotation (or something like that).

Note. I have no way of testing to know if this is correct, or not. :-?


Title: Re: SDK, LVAR, custom key mapping etc
Post by Kees on Apr 22nd, 2020 at 8:53am
Hi,

This program code works for the altitude (with the correct klid of course) but not for the heading in the MCP. When the heading is eg. 090 and I turn the knob of the heading (ipc.writeLvar("klid", 1703015)), the heading stays 090.

Kind regards,
Kees

Title: MCP -B757 - SDK Guidance
Post by flyingjayaraj on Aug 8th, 2020 at 7:30am
Hi All, making an B757 MCP, using the CW757 and Mobiflight software. I have the CW757 SDK, but i am having a problem interpreting it as am a newbie at this.

The Lvar for the Airspeed Display is G03_001_IND

How do i use this info to display the data on the 7-Segment -  Mobiflight uses offsets / the L:var has to be written to a free fsuipc offset and used thereafter

Is there any other software i can use that will be supported by CW757 or incase there is any script / technique i can use to display the data, please do share.  :(

Woud there be any guide or post that deals with using the SDK for home cockpit building on the forum ?  :-?

Regards
AJ

Title: Re: SDK, LVAR, custom key mapping etc
Post by Luke Kolin on Sep 20th, 2020 at 8:13pm

Markoz wrote on Apr 21st, 2020 at 1:13pm:
From the SDK:

FOR KNOBS ( _KNO)

1. Convert the element's name into an ID number.
2. Add the - (minus) for counterclockwise rotation.

For example:

(L:klid) = 1702003 - clockwise rotation.
(L:klid) = -1702003 - counterclockwise rotation.

So would the above from the SDK mean L:1702003 is clockwise rotation, and L:-1702003 is counterclockwise rotation?

If so, could this mean you need to use L:1703002 for clockwise rotation, and L:-1703002 for counterclockwise rotation (or something like that).

Note. I have no way of testing to know if this is correct, or not. :-?


It doesn't appear to be correct. I am trying to write to the FO HSI range knob (P20_005_KN6) by writing 2620005 and -2620005 to the KLID variable, and neither has any effect. :/

Cheers

Luke

Title: Re: SDK, LVAR, custom key mapping etc
Post by Luke Kolin on Sep 29th, 2020 at 2:14pm
Has anyone managed to get the KLID LVAR working properly? I've tried it for several different buttons, via FSUIPC offsets as well as Lua, with no effect.

:-/

Cheers

Luke

CAPTAIN SIM FORUM » Powered by YaBB 2.6.0!
YaBB Forum Software © 2000-2024. All Rights Reserved.