Jump to content
The simFlight Network Forums

hoinarut

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by hoinarut

  1. Hello again, Thank you for all the info. Regarding the "From where ...", yeah, i meant if from Aircraft.cfg or somewhere else. I'll dig up the documentation. Regards.
  2. Hello, thanks again for the prompt response :) I would've said that aircraft like Cessna (the single propeller ones) don't have autopilot, but it seems i was wrong. I wouldn't want to go for the aircraft.cfg method, because i would allow some friends of mine to use this application, and i wouldn't have a 100% sure thing when it comes to configuration files and all. Is there any possibility to retrieve through FSUIPC client dll for .net the aircraft model also? As far as i can see, for feelthere B777-200ER for example, all i get is BOEING, for A318 i get AIRBUS. What does the offset for aircraft type actually retrieve? (by that i mean from where ...). Regards, Tudor Hoinaru
  3. Hello there, First of all thanks for your prompt response. As far as i know about Cessna, it doesn't have Autopilot. I might be wrong though, i will try also with a glider or something. I was 99% sure it can't be a DLL issue, but rather a FS issue. I'll be able to confirm that later today (i am at work now so 8+ i'll be back to codingnow i'm coding for "others" :) ). I would have another question which came on top of my mind now. So, you've offered the possibility to instantiate an Offset by specifying a GroupName, which then might be specified in the Process() overloaded method (awesome feature, i want to add). In my app, i have got about 4 Groups of offsets: Aircraft Info, Flight Info, Autopilot Info and Lights Info. I am using in read/write mode the Autopilot and Lights when needed (as you could see in my code, when the private bools are true - _processAutoPilot, _processLights). To get to my question, basically based on those bools i am calling a Process({group_name} but in my timer_tick event handler, i might call Process 4 times (i have 4 groups). Is that much more resource consuming then rather calling Process() without any group name (when all the groups must be processed) ? Thanks in advance, again.
  4. Hello there, i have a question regarding the offset addresses. I am developing a small application (.net 3.5 with WPF) which is supposed to be able to accomplish basic tasks, like gather flight information, aircraft information, and so on. So far i've managed to create an Autopilot Panel, Lights Panel (as the one in the example from the SDK), and some basic info. I am a bit in a doubt regarding the 0764 address. FSInterrogate says (which i assumed) that the value is 1 if AP is available, 0 if not. However in code, running the debbugger that offset always returns 1 (i've tried with cessna, feelthere airbus A318, B777, PMDG MD-11 and so forth). Even trying to retrieve the value with FSInterrogate, it is still 1 in all cases. My question is - is this a) issue caused by my FSUIPC dll, b) issue from FS (someth not configure correctly, as in not setting that value to 0 inside FS itself), c) this isn't really working at all ? I would need that value in order to make visible or not the Autopilot Panel. Thanks in advance! P.S. for whoever is interested, i can make the code available, as long as i don't break any rules :) Forgot to mention, i am using C#. Here's the code i am using to retrieve the value: Declaration: ... public Offset autopilotAvailable = new Offset(FSUIPCGroupProcess.Aircraft, FSConstants.AutopilotAvailable); ... declared as public because i access it from a UserControl Usage: public void ProcessAicraftInfo() { try { _fs.Process(FSUIPCGroupProcess.Aircraft); lblAicrType.Content = aircraftType.Value; lblAicrState.Content = aircraftState.Value == 1 ? "On Ground" : "Airborne"; _isAutopilotAvailable = autopilotAvailable.Value == 1 ? true : false; lblApAvailable.Content = _isAutopilotAvailable ? "Yes" : "No"; } catch (FSUIPCException ex) { if (ex.FSUIPCErrorCode == FSUIPCError.FSUIPC_ERR_SENDMSG) { //Force disconnect Disconnect(); System.Windows.MessageBox.Show("FSUIPC Connection Lost."); } } } _fs is instance of FSInstance class created by me, which exposes different methods from FSUIPCConnection and so forth. Disconnect() is another method which calls FSUIPConnection.Disconnect() and clears some variables from the current Window and so forth.
×
×
  • 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.