Jump to content
The simFlight Network Forums

PSchrenk

Members
  • Posts

    6
  • Joined

  • Last visited

About PSchrenk

  • Birthday 01/01/1970

Contact Methods

  • Website URL
    http://

PSchrenk's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello Scott.... could you send me some VB.NET code samples for FSUIPC to p.schrenk@mynetwork.at ? I still have some problems with getting the proper values. Some parts, like FS Time and Flaps are no problem, others like IAS keep me puzzled, it just starts with 32 and then keeps increasing it by 8. It really would get me started with my FS Project (turning 50 percent of my living room into a cockpit which uses 5 computers running widefs for displaying the cockpit elements), and since i see what problems a less experienced programmer ( :oops: like me) steps into with VB.Net and FSUIPC i'd publish the examples and such on my webserver for future "starters". I'd really appreciate the help. Best wishes from vienna, Peter
  2. Hi Pete, you are right with the value of 4, i guess i should get new glasses. (or drink more cawfee :idea: ) About Visual Basic.... well, it depends on the needs, at work i use VB 6.0 and VB.Net, so of course i use it at home too. Beside that, for me C is REALLY confusing since i am used to VB. I guess its what you "grow up with", i did with the C-64 and later AmigaBasic. best wishes from me and my cawfee-machine, Peter
  3. Hello Pete, to "FSUIPC_Get": in the SDK Mr. Scott wrote it like that: I think the Get actually converts the Byte Values into an Integer, and that is why i get the correct value now. I just tried to follow the instructions to do all properly. About the Offset and Size: It is declared as integer, so i converted it to decimal. The size was set to 2 since it is written like that in the FSUIP for Programmers document. About crashing the program (and prolly FS2004).... you can believe me that i am amazed myself, this is the first time i try anything like this. (At work i have predefined and documented API's for programming aka put parts together no-brainers.) Thank you for taking the time here, as experienced C programmer it must be really cruel the way i handle this code so far. :oops: with best regards, Peter
  4. Hi again, and a BIG "Thank You" to you Pete !!!!! I used "Byte" for the declaration since the Function showed it as "ByRef Result as Byte". But actually i needed an Integer. So i corrected the Dim MyResult as Byte to Dim MyResult as Integer. And got the Flap values listed in the manual. Tomorrow i'll look at the bank and such. Thanks again for pointing me into the right direction. Best wishes to you from vienna, Peter
  5. Hello Pete, here is the code where i get the 255 for the flaps: Dim Flaps As Integer Dim MyResult As Byte Dim Currentflap As Long mod_FSUIPC.FSUIPC_Read(3036, 2, Flaps, dwResult) mod_FSUIPC.FSUIPC_Process(dwResult) mod_FSUIPC.FSUIPC_Get(Flaps, MyResult) Currentflap = MyResult.ToString MsgBox("Current Flap: " & MyResult.ToString) I would not understand thou why the .ToString would give me only the first byte. Unfortunatly there is no example in the .Net SDK, so i am pretty much in the dark right now. greetings, Peter
  6. Hi, in VB.Net the return value after calling the FSUIPC_GET Function is (by SDK Design) an Integer Value. Going through the FSUIPC for Programmers Manual i saw that the calculations are all based on Long Values. Is there any way to access them as Long value in VB.Net ? I tried to display the bank and pitch angle in degrees, but to no avail. With the flaps i could help myself and take portions of 255 (the value i get for full flaps), but with bank and angle it does not seem to work. I hope i didn't write it totally confusing. Thanks in advance, Peter Schrenk
×
×
  • 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.