Jump to content
The simFlight Network Forums

sesc360

new Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

sesc360's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Ok understood! Thanks for the explanation. Now I got it working!
  2. I would be interested to learn more about the Offset Mapping. In the Mapping from PMDG to FSUIPC PDF for the 737 it is mentioned: "The list here is simply a version of the full list in the PMDG_NGX_SDK.h file with the hexadecimal offset (6420-661F inclusive), size in bytes, and type of value added." Where is (6420-661F inclusive) coming from? My example uses the LTS_AntiCollisionSw that is defined in the PMDG SDK struct "PMDG_NGX_Control" with the value 0x6501 So if I want to write a proper mapping and would not have the PDF available, how would I correctly map the values instead? Is this a random number selected for this switch?
  3. Dear all, I read a lot about how to connect FSUIPC with PMDG, but still feel stuck. I want to start simple and just flick a switch for a start, so what I did is this to flick the AntiCollisionLight on the OVHD. 1) Adapt the ini of PMDG 2) write up a test function to switch the light switches private Offset<BitArray> Lights = new Offset<BitArray>(0x0D0C, 2); private Offset<int> sendControl = new Offset<int>(0x3110, true); private Offset<int> controlParameter = new Offset<int>(0x3114); private readonly int EVT_OH_LIGHTS_ANT_COL = 69756 ; public void Process() { try { FSUIPCConnection.Process(); } catch (FSUIPCException ex) { if (ex.FSUIPCErrorCode == FSUIPCError.FSUIPC_ERR_SENDMSG) { // Send Message error - connection lost to FSUIPC FSUIPCConnection.Close(); } else { throw ex; } } } public void SetLightSwitch(int lightSwitch, bool state) { // this.Lights.Value[(int)lightSwitch] = state; controlParameter.Value = EVT_OH_LIGHTS_ANT_COL; sendControl.Value = Convert.ToInt32(state); } The function Process() is called through a timer in my .net windows form app every 200ms. When I start the app nothing happens within PMDG 737NGX. I tested my functions with a default plane and I can switch my switches with the commented out line in my SetLightswitch properly, so the connection is working. I have difficulties understanding how to read and write to PMDG only using FSUIPC. Can you help me please and show me an example how it is done properly?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.