Jump to content
The simFlight Network Forums

cyberconian

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by cyberconian

  1. Greetings, In C# I have a problem with the FSUIPCConnection.dll when it comes to reading an offset more than once. Class c { Offset aspd = new Offset(0x02BC); // Airspeed public c( ) { } } C c1 = new c() // works fine to this point C c2 = new c() // I get an exception in C# saying that "An item with the same key has already been added." I am developing a c# application under Visual C# Express. How do I go about preventing this from happening? Is there a limitation that a class that contains an offset can only every be used once? Thanks for your time and patience.
  2. Thanks guys for your great help! I followed your advices and changed the code for air temp to this: Offset oat = new Offset(0x0E8E); I only need an integer, as accuracy in this program is not for mission critical purposes. You guys must forgive me on this data type thing, the only other programming knowledge I have is from PHP which doesnt deal with data types or bytes or bits and things like that, so offsets and specific data types is a new thing to me.
  3. Thanks pete for your help! Very fast service. Im Impressed mate! int Oat = (int)(BitConverter.ToInt16(oat.Value, 0) / 256d); That line of code solved my problems in C#. I dont come from a C/C++ background, only electronic systems engineering where I have dealt with bits at the voltage level. My degree came in handy to solve this little problem that plagued me for a few hours. Thanks again for your help! Christian
  4. Hi all, I have purchased WideFS and FSUIPC. I am writing the Connashow program, and so far its going ok. However, I have some problems when I try to read a variable or two. 1. Outside Air Temperature. According to the FSUIPC manual, the variable is at 0x0E8C. I am told to multiply by 256 and read the variable by 2 bytes. However, the result is a massive number (-2147483648) degrees Celcius. I have used an read. What could be wrong here? 2. Wind Speed Similar problem as with Outside Air Temp. 0x0E90 for 2 bytes. Thanks for your help. I managed to make this program work over a network...
×
×
  • 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.