May 14, 20206 yr Has anyone figured out the LVARS for binding lights (TAXI, LANDING, STROBE) and or Fuel / Engine controls to hardware ?
May 15, 20206 yr 5 hours ago, julian46 said: Has anyone figured out the LVARS for binding lights (TAXI, LANDING, STROBE) and or Fuel / Engine controls to hardware ? (L:MU2B_STROBE ,bool) 0 = Off, 1 = On (L:MU2B_BEACON ,bool) 0 = Off, 1 = On (L:MU2B_NAV ,bool) 0 = Off, 1 = On (L:MU2B_TAXI ,bool) 0 = Off, 1 = On (L:MU2B_SWITCH,bool) Landing light -1=retracted, 0=extended but Off, 1= On For the first 4 switch sounds you can use (L:XMLSND71,n) where n = 0 for Off and n=1 for On. For the landing light, (L:XMLSND68,n) is the cockpit switch sound and (L:XMLSND67,n) is the motor sound that moves the lights. Again, n=0 for Off and n=1 for On. In case something in this code might be helpful to you, the following Lua function will start the MU-2 engines provided you first select Ready to Start on the MU2 Control Panel; put condition Levers at Taxi position, and Throttles at Ground Idle. The code puts the props in Start Lock for the start, and takes props out of Start Lock after the start. function MU2B_Start_Engs() ipc.writeLvar("L:START_LOCK1",99) -- Start Locks on ipc.writeLvar("L:START_LOCK2",99) --Start Right Engine ipc.writeLvar("L:SWITCH_GND_L", 1) -- Ground start switch to the right engine (note SWITCH_GND_L=1 is for the right engine, there is no SWITCH_GND_R ) ipc.writeLvar("L:GND_ON_R", 1) ipc.writeLvar("L:GND_ON_L", 0) ipc.writeLvar("L:NTS_RIGHT",1) -- Right Unfeather switch on ipc.writeLvar("L:SFE_R",1) -- Right Start fuel enrich on, actually a dummy switch ipc.sleep (1000) ipc.writeLvar("L:C441_STARTER2", 1) -- Right engine starter switch down ipc.sleep (8000) ipc.writeLvar("L:C441_STARTER2", 0) -- Right engine starter switch up ipc.writeLvar("L:NTS_RIGHT",0) -- Right Unfeather switch off ipc.writeLvar("L:SFE_R",0) -- Right Start fuel enrich off -- Gen reset ipc.sleep (1000) ipc.writeLvar("L:SWITCH_GND_L", 0) -- Ground start switch to the center ipc.writeLvar("L:GND_ON_R", 0) ipc.sleep(1000) ipc.writeLvar("L:DC_RH",1) -- Reset right DC Generator ipc.sleep(500) ipc.writeLvar("L:DC_RH",0) ipc.sleep(2000) -- Start Left Engine ipc.writeLvar("L:SWITCH_GND_L", -1) -- Ground start switch to the left engine ipc.writeLvar("L:GND_ON_L", 1) ipc.writeLvar("L:GND_ON_R", 0) ipc.writeLvar("L:NTS_LEFT",1) -- Left Unfeather switch on ipc.writeLvar("L:SFE_L",1) -- Left Start fuel enrich on; actually a dummy switch ipc.sleep (1000) ipc.writeLvar("L:C441_STARTER1", 1) -- Left engine starter switch down ipc.sleep (8000) ipc.writeLvar("L:C441_STARTER1", 0) -- Left engine starter switch up ipc.writeLvar("L:NTS_LEFT",0) -- Left Unfeather switch off ipc.writeLvar("L:SFE_L",0) -- Left Start fuel enrich off -- Gen reset ipc.sleep (1000) ipc.writeLvar("L:SWITCH_GND_L", 0) -- Ground start switch to the center ipc.writeLvar("L:GND_ON_L", 0) ipc.writeLvar("L:GND_ON_R", 0) ipc.sleep(1000) ipc.writeLvar("L:DC_LH",1) -- Reset left DC Generator ipc.sleep(500) ipc.writeLvar("L:DC_LH",0) --Start Lock Off ipc.writeLvar("L:START_LOCK1",50) -- Start Locks off ipc.writeLvar("L:START_LOCK2",50) return end Al Edited May 15, 20206 yr by ark
May 15, 20206 yr Author here is my humble start to the MU-2B lua script - if anyone has a more complete one - pls let me know: if ipcPARAM == 1 then ipc.writeLvar("L:MU2B_SWITCH",1) -- Land Light On return elseif ipcPARAM == 2 then ipc.writeLvar("L:MU2B_SWITCH",-1) -- Land Light Off return end I re-read earlier posts and found that in my small example above, now - sending parameter 1 triggers first command (lights on) and parameter 2 (lights off) - so on my way - mainly want to control lights at the point (also found that ipcPARAM and lua is case sensitive) hmmm - it moves the levers but the lights do not actually turn on and off - more work to do ...
Archived
This topic is now archived and is closed to further replies.