Visit Captain Sim web site  
  Welcome, Guest. Please Login or Register

 

Page Index Toggle Pages: 1 [2] 3  Send TopicPrint
 25 SDK, LVAR, custom key mapping etc (Read 16504 times)
Captain Sim
CS Team
*
Offline



Posts: 4215
Joined: Nov 7th, 2005
Re: The 1.1 manual and SDK
Reply #15 - Jun 4th, 2018 at 9:42pm
Print Post  
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.
  
Back to top
IP Logged
 
JasonPC
Full Member
*
Offline



Posts: 8
Joined: Jun 2nd, 2018
Momentary Action Switches
Reply #16 - Jul 18th, 2018 at 3:09am
Print Post  
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!
  
Back to top
 
IP Logged
 
coqui
Full Member
*
Offline



Posts: 5
Location: Ocala, Florida USA
Joined: Mar 8th, 2008
Gender: Male
Re: SDK, LVAR, custom key mapping etc
Reply #17 - Sep 22nd, 2018 at 11:28pm
Print Post  
Can anybody help on how to use the SDK and the LVARS ?
Any tutorial? Thanks
  

Carlos F Rodriguez
Back to top
 
IP Logged
 
Scholli04
Full Member
*
Offline



Posts: 104
Joined: Jan 4th, 2018
Request event ID's for some buttons/levers
Reply #18 - Nov 12th, 2018 at 11:25pm
Print Post  
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).
  
Back to top
 
IP Logged
 
Markoz
CS Team
*
Offline



Posts: 12361
Location: Victoria, Australia
Joined: Apr 24th, 2009
Gender: Male
Re: Request event ID's for some buttons/levers
Reply #19 - Nov 13th, 2018 at 1:22am
Print Post  
The SDK, that is included with the 757 III manuals (CS757CAPTAINIII_MANUAL_PART6_06.pdf), explains how to do what you want to do.
  

Mark Fletcher



PC: i7 10700K @3.8/5.1GHz | 64GB DDR4 3200 | 12GB RTX 4070 Super | 32" LCD Monitor | 1TB SSD & 2x2TB SSD | Win 11 Pro - FSX/FSX-SE/P3D3/P3D4/P3D5/P3D6/MSFS2020
15.6" Gaming Laptop: i7 7700HQ | 32GB DDR4 | 6GB GTX 1060 | 256GB SSD & 1TB HDD | Win 10 Pro 64bit - FSX-SE/P3D4
Back to top
 
IP Logged
 
Scholli04
Full Member
*
Offline



Posts: 104
Joined: Jan 4th, 2018
Re: Request event ID's for some buttons/levers
Reply #20 - Nov 13th, 2018 at 8:01am
Print Post  
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?
  
Back to top
 
IP Logged
 
matta757
New Member
Offline



Posts: 3
Joined: Dec 31st, 2018
SDK Question
Reply #21 - Jan 1st, 2019 at 12:05am
Print Post  
Hi all,

I just joined the forum because I am looking into purchasing the CS 757 to replace my 767 from another, unnamed company  Wink. 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
  
Back to top
 
IP Logged
 
Captain Sim
CS Team
*
Offline



Posts: 4215
Joined: Nov 7th, 2005
Re: SDK Question
Reply #22 - Jan 1st, 2019 at 4:41pm
Print Post  
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).
  
Back to top
IP Logged
 
matta757
New Member
Offline



Posts: 3
Joined: Dec 31st, 2018
Re: SDK Question
Reply #23 - Jan 1st, 2019 at 5:42pm
Print Post  
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
  
Back to top
 
IP Logged
 
Captain Sim
CS Team
*
Offline



Posts: 4215
Joined: Nov 7th, 2005
Re: SDK Question
Reply #24 - Jan 1st, 2019 at 5:53pm
Print Post  
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.
  
Back to top
IP Logged
 
Captain Sim
CS Team
*
Offline



Posts: 4215
Joined: Nov 7th, 2005
Re: SDK Question
Reply #25 - Jan 1st, 2019 at 5:57pm
Print Post  
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".
  
Back to top
IP Logged
 
matta757
New Member
Offline



Posts: 3
Joined: Dec 31st, 2018
Re: SDK Question
Reply #26 - Jan 1st, 2019 at 6:00pm
Print Post  
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
  
Back to top
 
IP Logged
 
Captain Sim
CS Team
*
Offline



Posts: 4215
Joined: Nov 7th, 2005
Re: SDK Question
Reply #27 - Jan 1st, 2019 at 6:24pm
Print Post  
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.
  
Back to top
IP Logged
 
Hazzanz
Full Member
*
Offline



Posts: 11
Joined: Feb 3rd, 2016
Assigning a button for TOGA
Reply #28 - Jun 26th, 2019 at 1:09pm
Print Post  
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?
  

Back to top
 
IP Logged
 
Airlnkr
Full Member
*
Offline



Posts: 16
Location: Minneapolis, MN
Joined: Mar 1st, 2018
Gender: Male
Re: Assigning a button for TOGA
Reply #29 - Jul 22nd, 2019 at 2:48pm
Print Post  
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
  



Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 3 
Send TopicPrint
 
  « Board Index ‹ Board  ^Top