Jump to content
The simFlight Network Forums

Leaderboard

Popular Content

Showing content with the highest reputation since 07/08/2025 in all areas

  1. Note that you can see available lvars by listing them (Add-ons=>WASM->List Lvars) - no need to use the MSFS behaviors dialog, except as a last resort (i.e. usually to discover b-vars or h-vars). No problem about the incorrect lvar name - these things happen...! Now you have the correct name, you should check if setting that directly works to control the switch. If so, the assignments can be simplified as you don't need the compound condition on the position of your switches, and you only need to send the one one command to change the lvar two positions instead of three (e.g. switch up, pause, switch up). Anyway, you should try and understand those assignments and try to assign yourself the next time you want to make a conditional assignment. I will help if you run into problems, but you should have enough info in this thread to make a start. Regards, John
    1 point
  2. Your ini is also a bit of a mess. I have cleaned-it up a bit. Your device names/guids changed a few times, so I gave removed unwanted entries and corrected one missing one. I have also updated your profiles to use substrings, so you don't have to keep adding variants to profiles. FSUIPC7.ini
    1 point
  3. Just took a quick look at the logs. You started to test BEFORE the lvars were available (5 seconds or so too early), so the first two button presses (26 and 29) had no effect. then the next few had no effect as the switches were out-of sync with the VC. The log does show some movement of the switch (or change of value of the lvar) - three switch-down commands were sent: 13672 [DEBUG]: Calculator code sent: 31 (>L:VC_Miscellaneous_trigger_VAL,number) 13735 [DEBUG]: Calculator code sent: 31 (>L:VC_Miscellaneous_trigger_VAL,number) 15485 [DEBUG]: Calculator code sent: 31 (>L:VC_Miscellaneous_trigger_VAL,number) Did you not see any movement of the switch at all? Also add logging of offset A002 (using Log->Offsets). Show me /attach another file with the lvar (L:VC_POSITION_LIGHT_SW) and offset logging activated, and also wait a bit before you start testing, and I will take a look at the new logs tomorrow.
    1 point
  4. Ok, then the presets should work. Ok, thanks. I should have also asked you to log the value of the lvar L:VC_POSITION_LIGHT_SW. Maybe you can do this as well for the next logs - details on how to log lvars are in the Advanced User guide (you add another section to your FSUIPC7.ini to do this...). Got to take the dogs out now and am finishing for the day. I will take a look at your logs tomorrow. John
    1 point
  5. I don't know - I don't have this aircraft. Have you tried it? Use the Add-ons->WASM->Execute Calculator Code menu option, and try sending each of the following: 30 (>L:VC_Miscellaneous_trigger_VAL, number) 31 (>L:VC_Miscellaneous_trigger_VAL, number) to see if those move the switch. They should work, as that lvar controls the dome switch (with parameters 38 and 39). Also try the following: 10 (>L:VC_POSITION_LIGHT_SW, number) 0 (>L:VC_POSITION_LIGHT_SW, number) 20 (>L:VC_POSITION_LIGHT_SW, number) to see if those move the switch. If they work, we can simplify the assignments. If you still have issues, please activate WAPI Debug level logging (Log -> WAPI -> Debug) and logging for Buttons & Keys, and show me / attach your FSUIPC7.ini file and FSUIPC7.log file, the latter showing you using the assigned buttons. And always exit FSUIPC before attaching files please. John
    1 point
  6. Yes - sorry, I forgot to add the conditional letter 'C and the conditional comes after the press 'P' letter'. Should be 7=BA002=10 CP(+M, 29)M,27,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 8=BA002=10 CP(+M, 28)M,27,CPNav_Strobe_Switch_Up,0 -{Preset Control}-
    1 point
  7. Ok, then we have: Nav switch Down, Strobe Switch Down: VC_POSITION_LIGHT_SW = 20 (NAV lights steady, strobes OFF) Move nav switch up: VC_POSITION_LIGHT_SW = 10 (NAV and strobe lights OFF) Move strobe switch up: VC_POSITION_LIGHT_SW = 0 (NAV and strobe lights ON) Nav switch Down, Strobe Switch Up: VC_POSITION_LIGHT_SW = 0 (NAV and strobe lights ON) Move Nav switch up: VC_POSITION_LIGHT_SW = 10 (NAV and strobe lights OFF) Move strobe switch down: VC_POSITION_LIGHT_SW = 20 (NAV lights steady, strobes OFF) Nav switch Up, Strobe switch down: VC_POSITION_LIGHT_SW = 10 (NAV and strobe lights OFF) Move Nav switch down: VC_POSITION_LIGHT_SW = 20 (NAV lights steady, strobes OFF) Move strobe switch up: VC_POSITION_LIGHT_SW = 10 (NAV and strobe lights OFF) Nav switch up, strobe switch up: VC_POSITION_LIGHT_SW = 10 (NAV and strobe lights OFF) Move nav switch down: VC_POSITION_LIGHT_SW = 0 (NAV and strobe lights ON) Move strobe switch down: VC_POSITION_LIGHT_SW = 10 (NAV and strobe lights OFF) Re-arrange these by switch movement: Button 26 (nav switch up): set VC_POSITION_LIGHT_SW = 10 when VC_POSITION_LIGHT_SW = 20 set VC_POSITION_LIGHT_SW = 10 when VC_POSITION_LIGHT_SW = 0 Button 27 (nav switch down) set VC_POSITION_LIGHT_SW = 20 when VC_POSITION_LIGHT_SW = 10 & strobe switch down set VC_POSITION_LIGHT_SW = 0 when VC_POSITION_LIGHT_SW = 10 & & strobe switch up Button 28 (strobe switch up) set VC_POSITION_LIGHT_SW = 0 when VC_POSITION_LIGHT_SW = 20 set VC_POSITION_LIGHT_SW = 10 when VC_POSITION_LIGHT_SW = 10 (i.e. no change) Button 29 (strobe switch down): set VC_POSITION_LIGHT_SW = 20 when VC_POSITION_LIGHT_SW = 0 set VC_POSITION_LIGHT_SW = 10 when VC_POSITION_LIGHT_SW = 10 (i.e. no change) Note that button 27 is the only state change that needs a dependency on the state of another button as the VC_POSITION_LIGHT_SW value condition is the same. The next thing to determine if you can write to the lvar VC_POSITION_LIGHT_SW ti change the position? If so, this makes things easier, as you can then just write to the offset holding the lvar to change the position. But, as you said you need to use VC_Miscellaneous_trigger_VAL (with 30 for up and 31 for down) we will use that, So, define 4 presets (in your myEvents.txt file): //iFly/737-Max8/Lights Nav_Strobe_Switch_Up#30 (>L:VC_Miscellaneous_trigger_VAL,number) Nav_Strobe_Switch_Down#31 (>L:VC_Miscellaneous_trigger_VAL,number) Nav_Strobe_Switch_Up_Two#30 (>L:VC_Miscellaneous_trigger_VAL,number) 30 (>L:VC_Miscellaneous_trigger_VAL,number) Nav_Strobe_Switch_Down_Two#31 (>L:VC_Miscellaneous_trigger_VAL,number) 31 (>L:VC_Miscellaneous_trigger_VAL,number) I am not 100% sure about the _Up_Two and _Down_Two presets: we need to move the switch two positions for some assignments, but setting the same value to an lvar twice in the same calculator code string may not allow this. If not there are a few other things to try (see below). Now we can define our assignments: For Button 26, send switch-up when when VC_POSITION_LIGHT_SW = 20, and switch down when VC_POSITION_LIGHT_SW = 0 to send a switch up, using B as your Bravo device letter and starting the indices from 1 will give the following assignment entry: 1=PB,26,CPNav_Strobe_Switch_Up,0 -{Preset Control}- then add the offset condition on the value of VC_POSITION_LIGHT_SW held in offset 0xA002 1=BA002=20 PB,26,CPNav_Strobe_Switch_Up,0 -{Preset Control}- Next, we can duplicate that, change the index number, the preset and the offset condition for the switch down when VC_POSITION_LIGHT_SW = 0: 2=BA002=0 PB,26,CPNav_Strobe_Switch_Down,0 -{Preset Control}- Doing this for each button 27, we get: 3=BA002=10 PB,27,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 4=BA002=10 PB,27,CPNav_Strobe_Switch_Up,0 -{Preset Control}- and then we need to add the additional condition on the strobe switch position (buttons 28 and 29): 3=BA002=10 CP(+B, 29)B,27,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 4=BA002=10 CP(+B, 28)B,27,CPNav_Strobe_Switch_Up,0 -{Preset Control}- Doing this for all buttons, we end up with: 1=BA002=20 PB,26,CPNav_Strobe_Switch_Up,0 -{Preset Control} 2=BA002=0 PB,26,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 3=BA002=10 CP(+B, 29)B,27,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 4=BA002=10 CP(+B, 28)B,27,CPNav_Strobe_Switch_Up,0 -{Preset Control}- 5=BA002=20 PB,28,CPNav_Strobe_Switch_Up_Two,0 -{Preset Control} 6=BA002=0 PB,29,CPNav_Strobe_Switch_Down_Two,0 -{Preset Control}- So try that - just paste those entries into your profile buttons section, and change the joystick letter to the one you are using (also in the compound condition) and also make sure the index numbers are unique in your section. If the presets to move two positions don't work, you could try the following instead: 1=BA002=20 PB,26,CPNav_Strobe_Switch_Up,0 -{Preset Control} 2=BA002=0 PB,26,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 3=BA002=10 CP(+B, 29)B,27,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 4=BA002=10 CP(+B, 28)B,27,CPNav_Strobe_Switch_Up,0 -{Preset Control}- 5=BA002=20 PB,28,CPNav_Strobe_Switch_Up,0 -{Preset Control} 6=BA002=20 PB,28,C1152,5 -{pause (ms)}- 7=BA002=20 PB,28,CPNav_Strobe_Switch_Up,0 -{Preset Control} 8=BA002=0 PB,29,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 9=BA002=0 PB,29,C1152,5 -{pause (ms)}- 10=BA002=0 PB,29,CPNav_Strobe_Switch_Down,0 -{Preset Control}- Here we are sending he preset twice, with a short pause between each one. The trick here is to get the pause large enough so that both presets are executed, but small enough so that the update of the lvar has not been received yet to update the value in the offset condition on 0xA002. I have used 5ms - you can use logging to determine if this needs to be increased or decreased (probably increased if anything - try 10ms next and so on). Give those a try and let me know if either works as expected. John
    1 point
  8. Yes, I understood. Just trying to point out that when using two switches, one for each light, its never going to work in the same way as one 3-position switch to control the lights. The honeycomb light switches are designed for on/off of each of the lights, so however you implement this is going to be a fudge, but maybe ne that you can live with. And no need for the pictures either... Yes, that's fine. No, but you can assign to a preset and then make that assignment conditional on an offset value. Or just also add the lvar VC_Miscellaneous_trigger_VAL to an offset, and just use assignments with offset conditions, as I advised. If you can just tell me what you want the switch position to be in the UP/UP state I can show you how to do this - its easier to do it this way than in lua.
    1 point
  9. Hi John. you are really the BEST !!! Very very professional and always helping in a very short time. Thanks a lot again Claudio Damiani
    1 point
  10. Hi Peter, Nice simple solution. I have had P3D controls disabled for years and assign everything through FSUIPC. Rock solid! 👍
    1 point
  11. Better to keep the terminate function - always a good idea to close com connections. Cheers, John
    1 point
  12. Ok, interesting. With P3Dv4, it is always advised to start with a default aircraft, and then switch, especially if using complex add-ons, but probably a good idea to do this when using any add-on aircraft. Thanks for the update.
    1 point
  13. Ok, thats interesting - and I also don't understand why this would fix your issue - maybe there was an option you set that disabled this for some reason. But glad its now fixed! Maybe try comparing the old prepar3d.cfg (if you saved it) to the new one, to see what has changed that could affect this.
    1 point
×
×
  • 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.