Jump to content
The simFlight Network Forums

efratomer

Members
  • Content Count

    76
  • Joined

  • Last visited

Everything posted by efratomer

  1. I didn't know this option, how do I do it execly? or if you can tell me where I can learn about it. Thanks in advance, Omer.
  2. I would like a FS Module because I have built a VB program which comunicates with FSUIPC and I find it more comftarble to users who uses my program to use it without minize the FS each time.
  3. Thomas thanks for your reply. Is it possible to make a FS Module with C that will execute a VB program? Thanks, Omer.
  4. Hello guys, I have a program in VB, and I would like to put it as a module in FS, how is it possible? thanks, Omer.
  5. Working! the only problem was that you needed to do msgbox t not s :) but I fixed that. Thanks! So you mean for best performance of FS and my program I should make a single proccess for multiple read / write actions? Thanks, Omer.
  6. Thanks!! Works as magic!! What about current aircraft name? I've tried the offset 3D00, but it returns me some strange numbers: Dim tst As String Call FSUIPC_Read(&H3D00, 1, VarPtr(tst), dwResult) Call FSUIPC_Process(dwResult) MsgBox tst It wasn't what I ment anyway, nevermind, Really thanks Pete! Thanks, Omer.
  7. Here, Dim writetxt As String Dim delay As Integer delay = 4 writetxt = "test" Call FSUIPC_Write(&H32FA, 2, VarPtr(delay), dwResult) Call FSUIPC_Process(dwResult) Call FSUIPC_WriteS(&H3380, 1, VarPtr(writetxt), dwResult) Call FSUIPC_Process(dwResult) Thanks! Omer.
  8. Hey, It's only return "1" in the message box. Why is that? Thanks, Omer
  9. Well, Thanks Pete. I think i'll just give in with this one. I'ts not that improtant for me, just didnt thought it will be that difficult. Anyway, I have something more important for my program: I would like to write text messages into the simulator using the offset 3380. I just doesn't get string(text) inputs work... I have done this code: Dim writetxt As String writetxt = "Test" Call FSUIPC_Write(&H3380, 1, VarPtr(writetxt), dwResult) Call FSUIPC_Process(dwResult) Doesn't work :? Thanks in advance, Omer.
  10. Hello again, Thanks! Thats all I needed! What i've done was that in a click of a button your are getting located in some parking space at some airport including the heading of the parking... Another issue I have in mind: After im moving the plane into a far away coordinate, it doesn't show the loading screen and it loads while in the plane so you can see the loading action infront of you, I say its kind of ugly, Is there any way of forcing the simulator of showing the loading screen? Pete, sorry if you get tired of me :? Thanks in advance, Omer.
  11. I got you my problem was that I set the precentage and not the gallons... like I wrote it I want 70% of the fuel tank. Probebly thats why it was no accurate. as I told: I DID opened the FS first, of course. As I know, and as I read here in the forum old threads - VB Doesn't support 64-bit integers... I did looked in the documenation and found this: Now, if I have understood this correctly I have done the following: Dim dHi As Double Dim dLo As Double Call FSUIPC_Read(&H564, 4, VarPtr(dHi), dwResult) Call FSUIPC_Read(&H560, 4, VarPtr(dLo), dwResult) Call FSUIPC_Process(dwResult) dLo = dLo / (65536# * 65536#) If dHi > 0 Then dHi = dHi + dLo Else dHi = dHi - dLo End If dHi = dHi * (90# / 10001750#) At the end dHi was equal to: 2.32210853545386E-322 And I really doesn't know what this number means... In addition, I have tried to set the dHi and the dLo as Long varients, the result was that at the end dHi was equal to: 47 Which was part of my plane's coordinate: N47* 25.89' W122* 18.48' Why im getting 2.32210853545386E-322 instead of a decimal coordinate? Thanks, Omer.
  12. Hey Pete! Yes that what happend. Somehow, I have now checked but after I load the default 737 and opened the FSInterrogate I got all 0 in all of the fuel tanks in the plane (event though it was full on fuel on board). Well I just probebly didnt understood you in the last reply, I just didnt understood your talking on the Capacity of each fuel tank. This one I have seen. And have been thinking on using it, and after you wrote to use it. I have tried and it is now much much more accurate. I have done this: Dim setfuel As Long Dim maxfuel As Long Call FSUIPC_Read(&HB80, 4, VarPtr(maxfuel), dwResult) Call FSUIPC_Process(dwResult) setfuel = (1000 / maxfuel) * (128 * 65536) Call FSUIPC_Write(&HB7C, 4, VarPtr(setfuel), dwResult) Call FSUIPC_Process(dwResult) Now this have worked great! It actualy returned 1001 galons in the fuel tank. Tried the same code only with 1400 galons and that time it did returned 1400 galons in the fuel tank. :) I think the fuel situtation as been solved finally. THANKS!! :D Another question (really hope you still got power for me :oops:): What about plane coordinates? I have looked up for the right offsets and found the following: 0560 Lat Lo 0564 Lat Hi 0568 Long Lo 056C Long Hi I have tried to see what im getting for the Lat Lo (0560) by this code: Dim plane_latlo As Long Call FSUIPC_Read(&H560, 4, VarPtr(plane_latlo), dwResult) Call FSUIPC_Process(dwResult) MsgBox plane_latlo Now what that I had in the msgbox was: -1133445120 execly as I got in the FSInterrogate.... only problem is that I really dont know what to do with it for getting the full decimal lattitude and longtitude numbers of the plane. Some help please? Thanks in advance, Omer.
  13. Hey Pete, Well WOW now im confused. Its kind of them both? I want to set the fuel level as execly as I wrote him. Like 14.3 Galons in the left tank & in the right tank. Meaning, I do NOT want it to round it for 15 or 13 whatever. How shell I do it? I haven't seen in the offsets list an offset which will bring back Galons in tank... Did I missed it? Im really sorry but I didnt understand what you are saying here. Really thanks Pete! Omer.
  14. Well Pete, I worked on this for couple of hours now. I did found a close answer but still that rounding action really anoying :? My code: dim tfuel as long tfuel = 95 / 100 * (128 * 65536) Call FSUIPC_Write(&HB7C, 4, VarPtr(tfuel), dwResult) Call FSUIPC_Process(dwResult) I just done the opposit action as the read: CntrFuel * 100 / (128 * 65536) As I think you said. The only problem is that rounding as I said. I write 95 and it gives me 98. So... I tried make the variant as a double type, what happend was that tfuel was equel to 7969177.6 and then the simulator translate it to 10483% of fuel :?. With the long type variant tfuel equels to 7969178, and gives 98% fuel in the sim as I wrote above. How can I fix this? BTW, I hope you dont think that I ain't tring things my own, If you do, I wanna tell ya that I have succeed of making a Engine Fail with the Write function. as this: Dim tst As Byte Call FSUIPC_Write(&HB6B, 1, VarPtr(tst), dwResult) Call FSUIPC_Process(dwResult) Worked great 8) Thanks VERY MUCH, Omer.
  15. Hey Pete, Oh, you right. Probebly I just wrote that message when u just finished yours so I didnt saw it... To the point: I now tried this: Dim tfuel As Long tfuel = 95 / (128 * 65536) Call FSUIPC_Write(&HB7C, 4, VarPtr(tfuel), dwResult) Call FSUIPC_Process(dwResult) But somehow still getting a 0 in the fuel tank... And tried this also: Dim tfuel As Long tfuel = 8388608 Call FSUIPC_Write(&HB7C, 4, VarPtr(tfuel), dwResult) Call FSUIPC_Process(dwResult) But here I get 101% (How can it be?!) Thanks in advance, Omer.
  16. Hello again Pete, Are you sure u saw this one? Thanks in advance, Omer.
  17. Hey Pete, Thanks for your replies though I did passed this stage already. Please read my last reply, maybe you can help. Beyond that, I'm afraid that what High-Octane wrote isn't correct. So don't get scary from VB too fast :) Thanks in advance, Omer.
  18. Hello JBaymore, You are doing it all wrong... Just use the 2F80 offset. Which is: Panel Autobrake Switch. 0=RTO, 1=off, 2=brake1, 3=brake2, 4=brake3, 5=max Good luck, Omer.
  19. Hey again, Thanks jd! Oh, you right, I was with a cessna :) silley me. More questions (Hope you ain't tired :lol:): First, I have 50% fuel and it gives me 49, Do you know why? (Same as 100% fuel and 98 ). Second, If I would like to set the fuel stats, what should I do? Edit: I've tried this code: Dim tfuel As Long tfuel = 95 Call FSUIPC_Write(&HB7C, 4, VarPtr(tfuel), dwResult) Call FSUIPC_Process(dwResult) But somehow it sets a 0 in the left fuel tank, Why is that? My code for the Fuel read: Dim dwResult As Long Dim CntrFuel As Long Private Sub Timer1_Timer() If FSUIPC_Read(&HB7C, 4, VarPtr(CntrFuel), dwResult) Then If FSUIPC_Process(dwResult) Then CntrFuel = CntrFuel * 100 / (128 * 65536) Label1.Caption = CntrFuel End If End If End Sub Thanks in advance, Omer.
  20. Hello, Thanks for the explansions jd, much clearer now. Tried use cntrfuel as long, still getting 0. Omer.
  21. Hey, First of all, jD, Your code worked as a megic. Now, there are somethings I do not understand in your code: Dim x As Long Dim y As Single How can I know what type of variant I need? and: If y > 32767 Then y = y - 65534 why you done that? And, now if I would like to get the Fuel Capacity (offset B78, 4 bits), Ive done this code: Dim dwResult As Long Dim CntrFuel As Integer Private Sub Timer1_Timer() If FSUIPC_Read(&HB78, 4, VarPtr(CntrFuel), dwResult) Then If FSUIPC_Process(dwResult) Then Label1.Caption = CntrFuel End If End If End Sub Plus - I tried to set CntrFuel to 0 but with no luck too... All I get is 0 again... What am I doing wrong again? Thanks in advance, Omer.
  22. hey again, couple of things, First, I set Variant type which is kind of evrything so because I didnt knew what type of variant I shell need to fix this I put Variant. Second, im aware of that I labeled the output as fuel because before this offset I have tried to get the fuel infromation with no luck, then changed it to ground altitude, but just didnt changed the label. so.. now, I have tried to name the variant as Integer and did set it to 0 first. Now all I am getting is "131" output with no connection to what is my ground altitude in the session. My code is: Dim dwResult As Long Dim GndAlt As Integer Private Sub Timer1_Timer() GndAlt = 0 If FSUIPC_Read(&HB4C, 2, VarPtr(GndAlt), dwResult) Then If FSUIPC_Process(dwResult) Then Label1.Caption = "Altitude: " & GndAlt End If End If End Sub Thanks in advance & as I said enjoy yourself at the event, Omer
  23. Well, as your request: Dim dwResult As Long Dim auitime As Variant Private Sub Timer1_Timer() If FSUIPC_Read(&HB4C, 2, VarPtr(auitime), dwResult) Then If FSUIPC_Process(dwResult) Then Label1.Caption = "Fuel: " & auitime End If End If End Sub Isn't it need to be as simple as that? (Needless to say that I'm connected to the session already). Hope you will enjoy at the event Pete. Waiting for your (or someones) response. And thanks in advance, Omer
  24. Hello again, Pete, I thought it was needless to say that I have searched this forum and some other like it for an answer with no results. In addition, I have looked on the FSInterrogate as well, though, I didnt much understand from it, while I done outputs reads for things like: crash status, gear status, airborn status etc', I had problems reading the other offsets as i described in the above reply with the same way as the first ones. so I just dont understand what im doing wrong. still looking for a good example though. Thanks in advance, Omer.
×
×
  • 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.