Jump to content

Recommended Posts

Posted

Hi all, (-:I need some help regarding COM and NAV frequencies from FSUIPC.I am currently programming on my homesim, but I got some troubles reading COM and NAV values from FSUIPC.I program i VB (Visual basic) and everytime i read from the offset H034E in FSUIPC I got some strange values.I expect regarding to Peter Dowson

Posted

I tried it and it seemed to work as described. I've included the code I used. I am going to assume you are using the FSUIPC.bas module supplied in the FSUIPC SDK for VB.The code assumes you've already 'connected' to flight sim. The code ran off a button called Command1 and put the converted Hex value into a textbox called 'txtCom'.(Sorry the indentations are lost in HTML so it looks messy. Should cut and past OK though...)------------------------------------Private Sub Command1_Click()Dim intComFrequency As IntegerDim dwResult As Long' Set-up the read for the com1 offset (for 2 Bytes)...FSUIPC_Read &H34E, 2, VarPtr(intComFrequency), dwResult' Do the read...If FSUIPC_Process(dwResult) Then ' Convert into a string in hex format and display in text box Me.txtCom = Hex(intComFrequency)else MsgBox "Error " & dwResultend ifEnd Sub-------------------------------------If I tune com1 to 123.45 I get back 0x2345 (9029 in decimal).If you have any more questions, just ask...PaulEGJJ

Posted

Thank you Paul,It worked well this time. Now I see the point by using your example.Great :-smile12

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...