Jump to content
The simFlight Network Forums

Framac

Members
  • Posts

    25
  • Joined

  • Last visited

  • Days Won

    1

Framac last won the day on October 16

Framac had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Framac's Achievements

Rookie

Rookie (2/14)

  • Reacting Well Rare
  • Conversation Starter Rare
  • First Post Rare
  • Collaborator Rare
  • Week One Done Rare

Recent Badges

1

Reputation

  1. Done and working. Thank you so much. 👌
  2. Oh okay. Now I understand what's the problem. Yes, I will create a single instance on the main form. Thank you very much. 🙂
  3. Hi, I'm trying to use MSFS Variable Services on two forms but when I try to create two events, one on each form gives me an error. if I test one form at a time everything works fine. When I call both StartEfisServices() and StartRmpServices() gives me one error. What am I doing wrong? 😞 Form1: private MSFSVariableServices msfsVariableEfisServices = new MSFSVariableServices(); private FsLVar lVarEfisListen = null; .... public Form1() {... InitMSFSEfisServices(); ... } ... StartEfisServices(); private void InitMSFSEfisServices() { msfsVariableEfisServices.Init(Handle); // Initialise by passing in the windows handle of this form msfsVariableEfisServices.LVARUpdateFrequency = 10; // Check for changes in lvar values 10 times per second (Hz) msfsVariableEfisServices.Start(); } private void StartEfisServices() { lVarEfisListen = msfsVariableEfisServices.LVars["BTN_CSTR_1_FILTER_ACTIVE"]; lVarEfisListen.OnValueChanged += lVarListen_OnValueEfisChanged; lVarEfisListen = msfsVariableEfisServices.LVars["BTN_VORD_1_FILTER_ACTIVE"]; lVarEfisListen.OnValueChanged += lVarListen_OnValueEfisChanged; } __________________________________________________________________________ Form2: .... public Form2() {... InitMSFSRmpServices(); ... } ... StartRmpServices(); private void InitMSFSRmpServices() { msfsVariableRmpServices.Init(Handle); // Initialise by passing in the windows handle of this form msfsVariableRmpServices.LVARUpdateFrequency = 10; // Check for changes in lvar values 10 times per second (Hz) msfsVariableRmpServices.Start(); } private void StartRmpServices() { lVarRmpListen = msfsVariableRmpServices.LVars["A32NX_RMP_L_VHF2_STANDBY_FREQUENCY"]; lVarRmpListen.OnValueChanged += lVarRmpListen_OnValueChanged; <--------------------- Exception Thrown lVarRmpListen = msfsVariableRmpServices.LVars["A32NX_RMP_L_VHF3_STANDBY_FREQUENCY"]; lVarRmpListen.OnValueChanged += lVarRmpListen_OnValueChanged; } give me the error: System.NullReferenceException: 'Object reference not set to an instance of an object.'
  4. YES, thats what I want. 😁 you are always ready to help thank you again Paul 💪
  5. Hi @Paul Henty, it is possible to have a specific list/array of LVras and fire just one event if only one in that list changes, instead of having a method for each of them? Now I think I have one method for every one, or I have to read all of them and just see if the one I need changed. ... this.lVarListen1 = this.VS.LVars["A32NX_ADIRS_KNOB_1"]; this.lVarListen1.OnValueChanged += lVarListen1_OnValueChanged; this.lVarListen2 = this.VS.LVars["A32NX_ADIRS_KNOB_2"]; this.lVarListen2.OnValueChanged += lVarListen2_OnValueChanged; private void lVarListen1_OnValueChanged(object sender, LVarEvent e) {....} private void lVarListen2_OnValueChanged(object sender, LVarEvent e) {....} And so on... is there any chance that lVarListen is a list or array? Thanks
  6. If you are using the A320FBW they do not provide the HVars even though the A320NEO has them.
  7. Thank you very much Paul. 🙂
  8. Hi Paul, Maybe I explained it wrong and I found some information on the subject. In the FSUIPC place is a folder "EventFiles", In that folder are .evt files like "A32X-FBW1.evt" that are read by fsuipc after being copied to the executable location or declared in "fsuipc.ini". Example: [Events] 0=MobiFlight.A320_Neo_MFD_BTN_CSTR_1 1=MobiFlight.A320_Neo_MFD_BTN_WPT_1 I saw that these events can be used as controls. The control numbers for events in event files are determined as follows: control number = 32768 + (event file index)*256 + event index number I thought I could use these events as H/LVars with mobiflight wasm or in other way, but I think I can't, they have to be used as controls. It's correct? I saw this information in John Dowson reply to other topic.
  9. Hi. Is it possible to use the events from the .evt file with C#? I'm using A320FBW and there is a .evt file that contains the events I want, but I don't know how to use them. For example: [Events] 0=MobiFlight.A320_Neo_MFD_BTN_CSTR_1 (I have the mobiflight wasm installed.) How can I use them with C#? I appreciate any help, I lost hours and I didn't find a solution. 😞
  10. Hi Paul, Thank you very much for your great work. The Quick start example frmWASMTest() is available for download? Thanks
  11. It works. 😊 Thank you Paul. As I was using your class I had not seen that there is this offset. 😁
  12. Hi, in Europe the new 8.33 kHz frequency spacing has been introduced and currently many of airplanes use 3 decimal places on the radio, but I can only get the value of the first two, and the value of the third is always "0" For example on the radio I have "118.725" but with FSUIPC Client I only get "118.720" Is there any way to get the value of the third decimal place? Thank you Machado
  13. Hi Paul, Some planes use 3 decimal places on the radio, but I can only get the value of the first two, and the value of the third is always "0" For example on the radio I have "118.725" but with FSUIPC Client I only get "118.720" Is there any way to get the value of the third decimal place? Thank you Machado
  14. Thanks to both of you. Now everything is ok and I can read the L:Vars without problems . :) Thank you again Framac
  15. Yes, you are right, but even in R / W mode I can not get the value of LVar. I do not know if this is the right way to write the value to the offset 0x0D70 offset_sendlvar.Value = "0x366c0:LVAR_Name"; This is my code right now and only return zero. :( ... public static Offset<string> offset_sendlvar = new Offset<string>(0x0d70, 40); public static Offset<int> offset_readlvar = new Offset<int>(0x66c0); ... offset_sendlvar.Value = "0x366c0:VC_GSLD_CP_EFIS_ND_Mode_Knob"; FSUIPCConnection.Process(); ... int test= offset_readlvar.Value; I am not asking you to do the work for me but I think a little help with a more detailed answer would be useful not only for me but also for future users who have this problem. Sometimes the problem is in front of our eyes and we can not see it. Some of us are not professional developers and any small answer is a big help. :) Thank you for your help. Framac
×
×
  • 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.