April 13, 201610 yr Does anybody know how to assign landing/taxi lights switch to joystick button or keyboard shortcut? Artem Titov RusJet VA captain
April 13, 201610 yr Not tested. but you should be able to assign Ctrl-L to a joystick button. You'll need FSUIPC registered version for this.
April 13, 201610 yr Author Not tested. but you should be able to assign Ctrl-L to a joystick button. You'll need FSUIPC registered version for this. The main problem is that switch has 3 positions: up (landing)/middle(off)/down(taxi). I'd like to switch this positions with two buttons, i.e ctrl-PgUp/ctrl-PgDn. Artem Titov RusJet VA captain
April 15, 201610 yr Your question got me thinking about how to do this. I don't have the Citation but I have the Carenado Phenom 100. It has a three position landing / taxi light switch but slightly different (DN - OFF, CTR - Taxi Lt, UP - Ldg Lt). So I wrote a short LUA file with two scripts: one to move the switch up one position and one to move the switch down one position. I set the LVar so that the VC switch moves correctly and manipulate the landing and taxi lights through the 0D0C offset. The LUA file goes in the Modules folder with FSUIPC (need the paid version) and I assign the LUA file as a FS command in FSUIPC, to a two position rocker switch on my throttle quadrant with the parameter "1" for UP and "2" for DN. It could be assigned to a keypress just as easily. I'm not a P3D guy so I don't know if it will work there but here is my script. If you need help finding the Citation LVar for the switch or modifying the script for the Citation, let me know.Bruce---------------------------------------------- Phenom Landing_Taxi Lights Scripts------------------------------------------------------------------------------------------ Parameters by Number---------------------------------------------- 1 Move Ldg_Taxi Lt SW UP one position-- 2 Move Ldg_Taxi Lt SW DN one position------------------------------------------------ Variables--------------------------------------------SW_Pos = "L:ASD_SWITCH_LANDING_TAXI_EMB500"------------------------------------------------ Scripts---------------------------------------------- Move Ldg_Taxi Lt SW UP one positionif ipcPARAM == 1 thenSWPos = ipc.readLvar(SW_Pos)if SWPos == 0 thenipc.writeLvar(SW_Pos, 1)ipc.setbitsUW(0x0D0C, 8)endif SWPos == 1 thenipc.writeLvar(SW_Pos, 2)ipc.setbitsUW(0x0D0C, 4)ipc.clearbitsUW(0x0D0C, 8)endend-- Move Ldg_Taxi Lt SW DN one positionif ipcPARAM == 2 thenSWPos = ipc.readLvar(SW_Pos)if SWPos == 2 thenipc.writeLvar(SW_Pos, 1)ipc.setbitsUW(0x0D0C, 8)ipc.clearbitsUW(0x0D0C, 4)endif SWPos == 1 thenipc.writeLvar(SW_Pos, 0)ipc.clearbitsUW(0x0D0C, 8)endend [CPL] : I9-9900K @5.0GHz HT ON, Maximus XI Hero, ASUS TUF RTX4080 OC, 32GB DDR4 3200 14, 1TB NVMe SSD, 500GB SSD, 1TB HDD, 40" Samsung 4K TV, Honeycomb Alpha & Bravo, Logitech Rudder Pedals, WIN11
April 16, 201610 yr Author Bruce, a lot of thanks for your respond. I owe Carenado E50P too so I've tested your script and it works completly as I wished. Now can you tell me how to make it work in CJ2? Artem Titov RusJet VA captain
April 16, 201610 yr Author It seems I found the solution myself using my genius mind This is lua script I got: -------------------------------------------- -- Carenado CJ2+ Landing_Taxi Lights Scripts -------------------------------------------- -------------------------------------------- -- Parameters by Number -------------------------------------------- -- 1 Move Ldg_Taxi Lt SW UP one position -- 2 Move Ldg_Taxi Lt SW DN one position -------------------------------------------- ---- Variables -------------------------------------------- SW_Pos = "L:ASD_SWITCH_CJ2525A_LAND_TAXI_RECOG" -------------------------------------------- ---- Scripts -------------------------------------------- -- Move Ldg_Taxi Lt SW UP one position if ipcPARAM == 1 then SWPos = ipc.readLvar(SW_Pos) if SWPos == 0 then ipc.writeLvar(SW_Pos, 1) ipc.clearbitsUW(0x0D0C, 8) end if SWPos == 1 then ipc.writeLvar(SW_Pos, 2) ipc.setbitsUW(0x0D0C, 4) end end -- Move Ldg_Taxi Lt SW DN one position if ipcPARAM == 2 then SWPos = ipc.readLvar(SW_Pos) if SWPos == 2 then ipc.writeLvar(SW_Pos, 1) ipc.clearbitsUW(0x0D0C, 4) end if SWPos == 1 then ipc.writeLvar(SW_Pos, 0) ipc.setbitsUW(0x0D0C, 8) end end Artem Titov RusJet VA captain
April 16, 201610 yr Great! Glad I could help.For any others that use this, beware that you need FSUIPC 4949e (I think that was the fix version but not positive) or later (latest is best). Before the fix, using this script would clear all other light bits when setting or clearing the targeted bit.Bruce EDITED: I forgot to mention an "improvement" on the E50P scripts is to use the clearbitsUW before the setbitsUW in the two instances where they are together in order to turn off a light before turning the other one on. Otherwise you get a momentary flash that is both light masks being on at the same time. [CPL] : I9-9900K @5.0GHz HT ON, Maximus XI Hero, ASUS TUF RTX4080 OC, 32GB DDR4 3200 14, 1TB NVMe SSD, 500GB SSD, 1TB HDD, 40" Samsung 4K TV, Honeycomb Alpha & Bravo, Logitech Rudder Pedals, WIN11
April 16, 201610 yr Author I mentioned now that my switches turn ALL lights off somehow. I cannot fix it yet. My genious mind stucks. Artem Titov RusJet VA captain
April 17, 201610 yr Did you update FSUIPC to 4949h? If you have earlier than 4949c it will turn off all other lights. [CPL] : I9-9900K @5.0GHz HT ON, Maximus XI Hero, ASUS TUF RTX4080 OC, 32GB DDR4 3200 14, 1TB NVMe SSD, 500GB SSD, 1TB HDD, 40" Samsung 4K TV, Honeycomb Alpha & Bravo, Logitech Rudder Pedals, WIN11
April 17, 201610 yr Author Yes! Update to 4.949k solved simultaneous lights toggling. And I rewrite lua code using togglebits command so the final version looks like this: SW_Pos = "L:ASD_SWITCH_CJ2525A_LAND_TAXI_RECOG" -- Move Ldg_Taxi Lt SW UP one position if ipcPARAM == 1 then SWPos = ipc.readLvar(SW_Pos) if SWPos == -1 then ipc.writeLvar(SW_Pos, 0) ipc.togglebitsUW(0x0D0C, 8) end if SWPos == 0 then ipc.writeLvar(SW_Pos, 1) ipc.togglebitsUW(0x0D0C, 4) end end -- Move Ldg_Taxi Lt SW DN one position if ipcPARAM == 2 then SWPos = ipc.readLvar(SW_Pos) if SWPos == 1 then ipc.writeLvar(SW_Pos, 0) ipc.togglebitsUW(0x0D0C, 4) end if SWPos == 0 then ipc.writeLvar(SW_Pos, -1) ipc.togglebitsUW(0x0D0C, 8) end end P.S. God damn it! I'm becoming programist via my simmer way! Artem Titov RusJet VA captain
Create an account or sign in to comment