Jump to content
The simFlight Network Forums

TheAviationFox

Members
  • Posts

    16
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Germany

TheAviationFox's Achievements

Rookie

Rookie (2/14)

  • Collaborator Rare
  • One Month Later Rare
  • Week One Done
  • Reacting Well Rare
  • First Post Rare

Recent Badges

0

Reputation

  1. Yes, I have tested the correct LVAR VC_POSITION_LIGHT_SW_VAL in the WASM executor and in fact it only moved the switch, but did not change the lights status. I created that list of LVARs through the WASM-menu, but I personally find the Behaviour Tool better, because I can easier find the switch variables and actually test their functions/values. Obviously I am not proficient enough at actually connecting the dots of these variables, but eventually we will get there. I will keep the Preset that you have created for me, it does the job for me and I am happy!
  2. Thanks for tidying my INI-file! And now we got to the even more interesting part: when I implemented the logging of the LVAR VC_POSITION_LIGHT_SW, the log came back with an error message, saying that this LVAR was unknown to it. Oh dear. I activated Developer mode again and checked the behaviour of the light switch and to my own surprise and shame I had provided you with an incomplete LVAR-name in my first post regarding this topic. It was late night and it slipped through me re-reading the post before submitting it. The correct LVAR is VC_POSITION_LIGHT_SW_VAL. I have now corrected the LVAR name in the INI-file and guess what: your preset code works exactly as advertised. Thank you so much and I apologize for wasting your time by providing an incomplete LVAR, I am embarrassed! Allow me to express my gratitude for your help and patience, top notch user support here!! Thanks John!
  3. Yes, the dome lights work perfectly with the presets that you had created, the switch in the VC moves as requested. The NAV STROBE switch does not move at all, strange. Good idea. 30 and 31 worked, but sadly (>L:VC_POSITION_LIGHT_SW, number) did not work for any of the 3 values. As requested by you I logged my use of switches, see the files attached. I operated the 2 switches as I would in virtual cockpit. When I started logging, the NAV switch was UP, the STROBE switch was DOWN: I then moved the NAV switch DOWN After this I moved the STROBE switch UP Then I returned the STROBE switch to the DOWN position Thereafter the NAV switch was moved UP Finally the STROBE switch was moved UP as well to simulate this condition as well I hope you can read something from the log file that will give you a clue of what needs to be done. Thanks for your patience with me. FSUIPC7.ini FSUIPC7.log
  4. When I used the Behaviour tool, which is part of the developer mode, I directly set those LVAR values which made the switch move and the lights go on. I will have to check this out later, need to do some shopping now.
  5. No more error messages, but it is still not moving the NAV STROBE light switch. Are we approaching this function the correct way? Can't we directly send an L:VC_POSITION_LIGHT_SW command to MSFS to move the switch to the requested position? From my understand this LVAR both moves the switch to the wanted position AND sets the light ON/OFF.
  6. Oh yeah, now I see that as well 🙂 I did not realize that (+M, 29) was a joystick assignment, dumb! I have corrected the entries and it does not work yet. There is an error message at two of the line: 5=BA002=20 PM,26,CPNav_Strobe_Switch_Up,0 -{Preset Control}- 6=BA002=0 PM,26,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 7=BA002=10 (+M, 29)PM,27,CPNav_Strobe_Switch_Down,0 << ERROR 19! Line ignored >> 8=BA002=10 (+M, 28)PM,27,CPNav_Strobe_Switch_Up,0 << ERROR 19! Line ignored >> 9=BA002=20 PM,28,CPNav_Strobe_Switch_Up,0 -{Preset Control}- 10=BA002=20 PM,28,C1152,50 -{pause (ms)}- 11=BA002=20 PM,28,CPNav_Strobe_Switch_Up,0 -{Preset Control}- 12=BA002=0 PM,29,CPNav_Strobe_Switch_Down,0 -{Preset Control}- 13=BA002=0 PM,29,C1152,50 -{pause (ms)}- 14=BA002=0 PM,29,CPNav_Strobe_Switch_Down,0 -{Preset Control}- ERROR 19 is The C.r Kor M needed for Control, Key or Macro is missing.
  7. Hi John, thanks a lot for taking your time with this. FSUIPC shows my Alpha Yoke to be joystick "M". I modified your suggested Presets to look like this: [Buttons.iFly B737 MAX8] 0=BA000=0 PH,5,CPiFly737MAX8_Dome_Light_Up,0 -{Preset Control}- 1=BA000=1 PH,5,CPiFly737MAX8_Dome_Light_Up,0 -{Preset Control}- 2=BA000=2 PH,5,CPiFly737MAX8_Dome_Light_Down,0 -{Preset Control}- 3=BA000=2 PH,5,C1152,50 -{pause (ms)}- 4=BA000=2 PH,5,CPiFly737MAX8_Dome_Light_Down,0 -{Preset Control}- 5=BA002=20 PM,26,C0,0 -{Custom control: <0>}- 6=BA002=0 PM,26,C0,0 -{Custom control: <0>}- 7=BA002=10 (+B, 29)PM,27,CPNav_Strobe_Switch_Down,0 8=BA002=10 (+B, 28)PM,27,CPNav_Strobe_Switch_Up,0 9=BA002=20 PM,28,C0,0 -{Custom control: <0>}- 10=BA002=20 PM,28,C1152,50 -{pause (ms)}- 11=BA002=20 PM,28,C0,0 -{Custom control: <0>}- 12=BA002=0 PM,29,C0,0 -{Custom control: <0>}- 13=BA002=0 PM,29,C1152,50 -{pause (ms)}- 14=BA002=0 PM,29,C0,0 -{Custom control: <0>}- The section LvarOffsets just below it: [LvarOffsets.iFly B737 MAX8] 1=L:VC_Dome_Light_Display_VAL=UB0xA000 2=L:VC_POSITION_LIGHT_SW=UB0xA002 For completeness, MyEvents.txt looks like this: //iFly/737MAX/Lights iFly737MAX8_Dome_Light_Up#39 (>L:VC_Miscellaneous_trigger_VAL,number) iFly737MAX8_Dome_Light_Down#38 (>L:VC_Miscellaneous_trigger_VAL,number) 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 just tried it in MSFS2020 and I cannot even find those new Events, nor from the dropdown list or from the function "Find preset", unlike the Dome Light switches that show up nicely. I probably made a very simple mistake, but I could not spot it so far.
  8. UP/UP should be NAV/STROBE OFF, VC_Miscellaneous_trigger_VAL=10
  9. Hi John, thanks for your quick reply. Yes, I omitted the case "UP, UP", because I hoped that I could simply ignore this case and thus the logic would "do nothing", not move any switch. Obviously, I cannot omit this condition, thanks for pointing this out. Okay, probably I did not write it precisely enough. Technically the STROBES can never be ON without NAV lights being ON. The upper switch position (0) switches both types of lights on. The lower position (20) will switch NAV lights only ON. The middle position (10) means that NAV and STROBES are OFF. I guess you understood this well, I only wanted to be precise on this. In other words: when I turn the STROBE light switch from the lower position to the upper position, I want the switch in the VC to go to the upper position to have both NAV and STROBES - no matter what the NAV light switch on my joystick is doing. My logic is only that the NAV light switch would remain in the ON position and that switching STROBES to ON would simply flick the light switch in the VC to the upper position. For the case "UP, UP" I now decided to make the NAV light switch on the joystick some kind of master key - if it's not down, the STROBES cannot be switched ON, it's a compromise. Just to make sure we are on the same page: this is what the switches on the yoke look like: They are both shown in the down position. Below is a photo the switch in a 737: This my NAV switch on the yoke would be in the lower position to move the switch in the VC to the lower (STEADY) position, activating the NAV lights only. If I then moved the STROBE switch on the yoke to the upper position, the switch in the VC would move to the upper position "STROBE & STEADY", turning both NAV and STROBE lights on. The logic would look like this, if I am not mistaken: IF NAV light switch is 26 AND STROBE light switch is 29 THEN set VC_POSITION_LIGHT_SW =10 ELSE IF NAV light switch is 26 AND STROBE light switch is 28 THEN set VC_POSITION_LIGHT_SW =10 ELSE IF NAV light switch is 27 AND STROBE light switch is 29 THEN set VC_POSITION_LIGHT_SW =20 ELSE IF NAV light switch is 27 AND STROBE light switch is 28 THEN set VC_POSITION_LIGHT_SW =0 It's probably not the most efficient and I also need to know how to request these switch position values, that's why I am here 🙂 For a Preset in FSUIPC I need to create an offset [LvarOffsets.iFly B737 MAX8] 2=L:VC_POSITION_LIGHT_SW=UB0xA002 The offset UB0*A000 is already taken by the Dome Light Switch (1=L:VC_Dome_Light_Display_VAL=UB0xA000) from my first Preset that you kindly created for me earlier on. I hope that UB0xA002 is a valid offset, at least that's what I understood from the FSUIPC user manual. Can I make a preset that checks for the offset value AND for the switch positions on my yoke, that then sets the VC_POSITION_LIGHT_SW to the requested value 0, 10 or 20 ? Regarding the required code for FSUIPC.ini I have reached the limits of my knowledge to complete it.
  10. Hello again! I am a bit stuck with another task on the iFly 737 MAX8, After your help with the Dome lights and runway turnoff lights, I am now trying to improve the operation of the NAV and STROBE lights. I am using a Honeycomb Alpha yoke with 2 separate flip switches for NAV (button numbers 26 up, 27 down) and STROBE (button numbers 28 up, 29 down) lights In the aircraft, however, there is only one switch for these functions. The LVAR is called VC_POSITION_LIGHT_SW and its values are 0=STROBES and NAV ON 10=OFF 20=NAV STEADY ON The switch position can be changed by our good old VC_Miscellaneous_trigger_VAL and we need to call 30 to move it UP 31 to move it DOWN I am trying to program a logic where when the yoke NAV switch is UP and the STROBE switch is DOWN => VC_POSITION_LIGHT_SW = 10 (NAV and strobe lights OFF) when the yoke NAV switch is DOWN and the STROBE switch is DOWN => VC_POSITION_LIGHT_SW = 20 (NAV lights steady, strobes OFF) when the yoke NAV switch is DOWN and the STROBE switch is UP => VC_POSITION_LIGHT_SW = 0 (NAV and strobe lights ON) I am trying to create a LUA script to implement this logic, but I failed in reading the switch positions, how exactly do I do this? Or is better to go ahead and use an FSUIPC Preset? CP and CU won't work, since it is not a "press" or "release" event, but rather flipping the NAV-handle from position 26 to 27. Clueless greetings, Andreas
  11. Have you tried looking up the variables through MSFS "developer mode"? If not, start the MSFS developer mode, then open menu "Tools" and select "Behaviors" from the list. You can get a glimpse of the code behind a switch by hovering the mouse over a button or lever in the cockpit and then pressing "CTRL+G". Try this with the autobrake switch and find out what LVAR will actually move it and the LVAR that will activate each mode.
  12. I can report success! It took me a while to understand what this was all about - I am not a developer/coder 🙈 - but with your step by step instructions and reading the relevant pages in the manual did it. In the end my FSUIPC entries were [Buttons.iFly B737 MAX8] 0=PM,25,CL8:R,0 -{Lua iFlyTaxiRwyON}- 1=PM,24,CL7:R,0 -{Lua iFlyTaxiRwyOFF}- 2=BA000=0 PH,5,CPDome_Light_Up,0 -{Preset Control}- 3=BA000=1 PH,5,CPDome_Light_Up,0 -{Preset Control}- 4=BA000=2 PH,5,CPDome_Light_Down,0 -{Preset Control}- 5=BA000=2 PH,5,C1152,50 -{pause (ms)}- 6=BA000=2 PH,5,CPDome_Light_Down,0 -{Preset Control}- [LvarOffsets.iFly B737 MAX8] 1=L:VC_Dome_Light_Display_VAL=UB0xA000 The minimum delay that made it work was 50ms, anything shorter was not successful, Maybe some useful information for other iFly customers. I have to say that without your help there would have been no way for me figuring this out through offsets. The LUA scripts were already a challenge and I needed you correcting my code on how a LUA script reads information from the SIM! After learning these things now I am a few steps ahead and I can use the knowledge for future programming. Thanks!!
  13. Wow, thanks for taking your time to explain this to me, it all makes more sense now! I will have a close look at it as soon as possible. Your help is highly appreciated.
  14. Alright, I got it to work! The code I used is: if ipc.readLvar("L:VC_Dome_Light_Display_VAL") == 0 then ipc.execCalcCode("39 (>L:VC_Miscellaneous_trigger_VAL,number)") elseif ipc.readLvar("L:VC_Dome_Light_Display_VAL") == 1 then ipc.execCalcCode("39 (>L:VC_Miscellaneous_trigger_VAL,number)") elseif ipc.readLvar("L:VC_Dome_Light_Display_VAL") == 2 then ipc.execCalcCode("38 (>L:VC_Miscellaneous_trigger_VAL,number)") ipc.sleep(100) ipc.execCalcCode("38 (>L:VC_Miscellaneous_trigger_VAL,number)") end You will probably will see it as less efficient. When you wrote I'm trying to figure out how this would work. So, if I define a preset as suggested by you, how do I then proceed? Where do I define such a preset? Can you point me to the right support document or some kind of tutorial? Sorry, I'm pretty new to this part of coding and appreciate some hints.
  15. Thanks John for taking your time to reply. I will test it later tonight and will report back 🙂
×
×
  • 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.