Jump to content
The simFlight Network Forums

WideFS and Wifi


Recommended Posts

Installed widefs server on main PC in spare room. Installed WideFS Client on development PC in another room. All PC's are on a simple WiFi Network.

It works out of the box.

Installed FreeFD on development PC, it works too, and it does what it says it should do.

Darn, if this gets any easier I will hang up and go paint the forth bridge.

Kaela

Link to comment
Share on other sites

Hi Pete,

I am fighting a severe cold at the moment, so my thoughts may not be along the correct lines here but.

I have, as above, widefs client up and running on my development pc.

I have open, FSUIPC For Programmers, Page 17

offset hex 02BC, size 4, IAS(Indicated Air Speed)

I have adapted the freebie Visual Basic thingy (UIPC Hello) to read as follows:-

Private Sub Timer1_Timer()
Dim dwResult As Long
Dim auiTime() As Long
ReDim auiTime(4)

  ' If we wanted additional reads/writes at the same time, we could put them here
  If FSUIPC_Read(&H2B4, 5, VarPtr(auiTime(1)), dwResult) Then
    ' "Read" proceeded without any problems
    If FSUIPC_Process(dwResult) Then
      ' "Process" proceeded without any problems
          lbl1.Caption = Format(auiTime(1), "0000.0000")
          lbl2.Caption = Format(auiTime(2), "0000")
          lbl3.Caption = Format(auiTime(3), "0000")
          lbl4.Caption = Format(auiTime(4), "0000")
    Else
      ' Unable to "Process"
      lblClock.Caption = "Processing: " & ResultText(dwResult)
    End If
  Else
    ' Unable to "Read"
    lblClock.Caption = "Reading: " & ResultText(dwResult)
  End If
End Sub

I hoped I would see my Indicated Airspeed, but I see a repeating pattern of numbers that seem to bear no image of the flight sim model that is in progress.

It says, size =4, so I guess thats four bytes, 02BD, 02BF, 02C1 AND 02C3

The next offset is 02C4.... (agreed)

Someone point me in the right direction please....

Kaela

Link to comment
Share on other sites

If FSUIPC_Read(&H2B4, 5, VarPtr(auiTime(1)), dwResult) Then

' "Read" proceeded without any problems

If FSUIPC_Process(dwResult) Then

' "Process" proceeded without any problems

lbl1.Caption = Format(auiTime(1), "0000.0000")

lbl2.Caption = Format(auiTime(2), "0000")

lbl3.Caption = Format(auiTime(3), "0000")

lbl4.Caption = Format(auiTime(4), "0000")

[/code]

02B4 is not 5 bytes long, only 4. You want to read it into an Integer, not an array. You don't want to print each byte separately -- it is one binary value. And it isn't the indicated airspeed, it is the Ground Speed in units of 1/65536ths of metres/sec. Please re-check the tables in the programmers guide. You are reading something awafully badly it seems.

It says, size =4, so I guess thats four bytes, 02BD, 02BF, 02C1 AND 02C3

It is one integer of 32-bits wich occupies 4 bytes 9a byte is 8 bits, 4 x 8 = 32). You also aren't counting correctly. After 02B4 comes 02B5 then 02B6 and 02B7 -- not that any of that is relevant. you don't want 4 separate bytes, you want one 32-bit value.

Why are you counting byte addresses in 2's in any case?

If you want the IAS that is at 02BC not 02B4.

Please do take another look at the information provided. You can also try FSInterrogate2 which is highly instructive.

Pete

Link to comment
Share on other sites

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