Jump to content
The simFlight Network Forums

FLPilot

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by FLPilot

  1. See the subject heading says it all -- "DUMMY" I'll admit that! I'll try to absorb all this information a little more. Appreciate your input!

    Well, I didn't get any writes to work at all earlier, but I got the reads to work somehow. Below is an example of how I did that. I know you don't do VB, but it used that VarPtr thingamajig. It came from the FSUIPC_VB.zip or whatever it was named example file in the SDK.

    -----------------------------------------

    Dim dwResult As Long

    Dim Com1Act As Integer

    Dim Com2Act As Integer

    Dim Com1Sby As Integer

    Dim Com2Sby As Integer

    Dim Nav1Act As Integer

    Dim Nav2Act As Integer

    Dim Nav1Sby As Integer

    Dim Nav2sby As Integer

    Call FSUIPC_Read(&H34E, 2, VarPtr(Com1Act), dwResult)

    Call FSUIPC_Read(&H3118, 2, VarPtr(Com2Act), dwResult)

    Call FSUIPC_Read(&H311A, 2, VarPtr(Com1Sby), dwResult)

    Call FSUIPC_Read(&H311C, 2, VarPtr(Com2Sby), dwResult)

    Call FSUIPC_Read(&H350, 2, VarPtr(Nav1Act), dwResult)

    Call FSUIPC_Read(&H352, 2, VarPtr(Nav2Act), dwResult)

    Call FSUIPC_Read(&H311E, 2, VarPtr(Nav1Sby), dwResult)

    Call FSUIPC_Read(&H3120, 2, VarPtr(Nav2sby), dwResult)

    Call FSUIPC_Process(dwResult)

    lblCom1Act.Caption = "1" & Format(Hex(Com1Act) / 100, "00.00")

    lblCom1Sby.Caption = "1" & Format(Hex(Com1Sby) / 100, "00.00")

    lblNav1Act.Caption = "1" & Format(Hex(Nav1Act) / 100, "00.00")

    lblNav1Sby.Caption = "1" & Format(Hex(Nav1Sby) / 100, "00.00")

    lblCom2Act.Caption = "1" & Format(Hex(Com2Act) / 100, "00.00")

    lblCom2Sby.Caption = "1" & Format(Hex(Com2Sby) / 100, "00.00")

    lblNav2Act.Caption = "1" & Format(Hex(Nav2Act) / 100, "00.00")

    lblNav2Sby.Caption = "1" & Format(Hex(Nav2sby) / 100, "00.00")

    -----------------------------------------------------------------------------

  2. Thanks Pete, I appreciate your quick reply. I'm still a little confused by it all. I'll have to do some serious research i guess. I'm really in way over my head. perhaps if you posted an example in C, maybe I can decipher it. Or better yet, if anyone else out there reading this post can offer up some VB specific assistance.

    Would it be something like:

    -------------------------------------------------------------

    Dim Nav1Swap As Byte

    Nav1Swap = 2^1

    FSUIPC_Write(&H3123,2,VarPtr(Nav1Swap),dwResult)

    --------------------------------------------------------------

    That's what I tried but I get a compile error: ByRef argument type mismatch

  3. I figured out how to read the FSUIPC offsets, specifically all the Com/Nav Active/Standby Frequencies. I was trying to access offset 3123 to "swap" the frequencies from standby to active but am having no such luck.

    I saw some examples of how to write to an offset, but they didn't talk about writing to a specific bit.

    Could someone post an example of how I write "bits" to the offset to control these and many of the other offsets available also.

    If there is an example already somewhere that I missed, I would appreciate that also.

    My programming experience is limited to VBA code from my database writing days.

×
×
  • 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.