-
Posts
82 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by jd
-
-
here are two functions, one to read the pause state, the other to set it
Public Function pause() As Boolean ' 0 if not, 1 if retractable
Dim x As Integer
Dim dwResult As Long
Call FSUIPC_Read(&H264, 2, VarPtr(x), dwResult) 'updated 12/12/2002 per peter dowson
Call FSUIPC_Process(dwResult)
If x = 1 Then
pause = True
Else
pause = False
End If
End Function
Public Function set_pause(pause As Boolean) As Boolean
Dim x As Integer
Dim dwResult As Long
If pause Then
x = 1
Else
x = 0
End If
Call FSUIPC_Write(&H262, 2, VarPtr(x), dwResult)
Call FSUIPC_Process(dwResult)
End Function
-
i think the second write should be
Call FSUIPC_Write(&H32FA, 2, VarPtr(marker), dwResult)
write not writes
and is your output string ending with a zero?
output = output & chr$(0)
jd
-
works like a champ here. no problems
jd
-
the last time i tried was back in fs2000 and fs2002. there was something screwy. it seemed to be a factor of how much "altitude" the landing gear gave the plane, maybe a little barometric pressure. just when i had it working on my lear, i'd switch to the 737 and it was a bouncing betty.
i gave up. i just told the user to place their plane at the departure airport before starting radar contact :-)
jd
-
i use
Public Function set_Plane_Lat(lat As Single) As Single ' Planes latitude
Dim x As Long
Dim dwResult As Long
x = lat * 10001750 / 90
Call FSUIPC_Write(&H564, 4, VarPtr(x), dwResult)
Call FSUIPC_Process(dwResult)
End Function
Public Function set_Plane_lon(lon As Single) As Single ' Plane's longitude
Dim x As Long
Dim dwResult As Long
x = lon * 65536 * 65536 / 360
Call FSUIPC_Write(&H56C, 4, VarPtr(x), dwResult)
Call FSUIPC_Process(dwResult)
End Function
let me know if you figure out how to make the plane sit nicely on the ground, and not bounce up and down
jd
-
this is what i use
Public Function fix_to_fix_distance(lat1 As Single, lon1 As Single, lat2 As Single, lon2 As Single) As Single
Dim pi As Double
Dim degtorad As Double
Dim latx1 As Double
Dim latx2 As Double
Dim lonx1 As Double
Dim lonx2 As Double
pi = 3.1415926535
degtorad = (pi / 180)
latx1 = lat1 * degtorad
latx2 = lat2 * degtorad
lonx1 = -lon1 * degtorad
lonx2 = -lon2 * degtorad
fix_to_fix_distance = ArcCos((Sin(latx1) * Sin(latx2)) + (Cos(latx1) * Cos(latx2) * Cos(lonx1 - lonx2)))
fix_to_fix_distance = fix_to_fix_distance * 180 * 60 / pi
End Function
-
this will set the keys. it assumes that keys you want to set are in key_codes(i) and that the corresponding offsets are put into key_offsets(i)
Public Function set_keycodes()
Dim x As Long
Dim i As Long
Dim k As Long
Dim dwResult As Long
Dim j As Long
Call FSUIPC_Read(&H320C, 4, VarPtr(x), dwResult)
Call FSUIPC_Process(dwResult)
If x = 56 Then
i = 1
For k = &H3210 To &H32F8 Step &H4
Call FSUIPC_Read(k, 4, VarPtr(j), dwResult)
Call FSUIPC_Process(dwResult)
If j = key_codes(i) Then 'can we find our hot key
key_offsets(i) = k
i = i + 1
ElseIf j = 0 And i <= 28 Then 'can't find it, find an empty slot and write it out
Call FSUIPC_Write(k, 4, VarPtr(key_codes(i)), dwResult)
Call FSUIPC_Process(dwResult)
key_offsets(i) = k
If debug_flag Then Debug.Print i, key_offsets(i), key_codes(i)
i = i + 1
End If
If i > 28 Then Exit For 'done entering hot keys
Next k
End If
End Function
-
i don't think anyone will pay a dime for your information on how you fixed your pc
-
send me an email, and i'll see if i can help. jd@jdtllc.com
-
you need build 2191 or later, which is on http://www.jdtllc.com/rcv3/rcv31.zip
please read http://forums.avsim.net/dcboard.php?az=8396&page= because there additional files you will need to download
jd
-
yep, it was me :-)
here is my code that i use, and it works :-)
sstring = "ABCD1234WXYZ" & Chr(0)
Call FSUIPC_WriteS(&H8001&, Len(sstring), sstring, dwResult) '
Call FSUIPC_Process(dwResult)
-
you may want to change the line
If FSUIPC_WriteS(&H8001, 12, "123456789012", dwResult) = False Then
to
If FSUIPC_WriteS(&H8001, 13, "123456789012" & chr(0), dwResult) = False Then
-
you might also consider doing one fsuipc_process, instead of a bunch
-
you might also consider doing one fsuipc_process, instead of a bunch
-
mine says 2.975 while running in fs2002. did you try to unzip the .dll while fs2002 was running?
-
in fs200x/modules/fsuipc - what does the version number say?
it maybe the dll's properties are updated to reflect the current build number
-
ask yourself, is this a variable/value that is influenced by flight simulator or the pilot/user
if the pilot/user can adjust the value (comm frequencies, auto pilot heading hold value, brakes, lights, etc), then you can write through fsuipc.
this doesn't always hold true, but in general....
-
congrats pete on the forum. i'll see if i can answer a couple of posts here and there.
ADVdisplay and Project Magenta
in FSUIPC Support Pete Dowson Modules
Posted
someone posted on the rc forum that they docked the advdisp display to a pop up panel. (i'm paraphrasing). so when they want to see the advdisp display, the activate that panel, and deactivate it when they were done.
jd