Jump to content

vla320

Frozen-Inactivity
  • Content Count

    3
  • Donations

    $0.00 
  • Joined

  • Last visited

Community Reputation

0 Neutral

Profile Information

  • Gender
    Male
  • Location
    DUS

Flight Sim Profile

  • Commercial Member
    No
  • Online Flight Organization Membership
    none
  • Virtual Airlines
    No
  1. Hello, the developer do not need this file because he has other hardware for FCU. He was friendly to other users and has made this actions file as "base" to use the VRinsight MCP Combo 1. The software FMGS A320 from jeehell is a high quality freeware cockpit simulation software. If you want to have a look see this video: http://www.youtube.com/watch?v=0TZIM2i2xy8 I can try to connect him and i will see what he can do. Sorry BR Veit
  2. Hello Lua and Linda experts, i have a problem with the VRinsigt MCP Combo 1 and the A320 FMGS software from jeehell. The programmer of the jeehell A320 cockpit software has created a lua actions file to connect the MCP combo to the jeehell A320 software. In Linda i have created an aircraft profil with this actions file as base. Then i have configured the HDG rotary and 2 keys for switching the QNH between mb/inhg for testing. If i start up the FSX and Linda there is no sync between the FCU displays from the jeehell software and the MCP displays. The same with the key´s they do not work. I think the Linda and fsuipc connection ist good because when i use an fsx default aircraft all is fine. Have somebody an idea for this problem ? I´m not a programmer but i have checked the offsets in the lua actions file with the offsets in the docu from jeehell software an all is ok. In linda i can see a list of all functions from the lua actions file to give them a button on the mcp but it is not working. In this menu with the functions list are 2 menu entries like Evtimer (Time) and Init Vars what about this entries i have done nothing with this entries or is that the problem is there an action to do someting with this "files" or entries. i think this is the defination of the lua variables but i can do nothing with them. I hope somebody has an idea. :smile: BR Veit Here the fsuipc log when i give a command with the HDG rotary, then there is a lua error in the log: ******** FSUIPC4, Version 4.921f by Pete Dowson ********* Running inside FSX Module base=077C0000 User Name="blanked" User Addr="blanked" FSUIPC4 Key is provided WideFS7 Key is provided 0 System time = 23/11/2013 14:21:06 0 FLT UNC path = "C:\Dokumente und Einstellungen\FSX\Eigene Dateien\Flight Simulator X-Dateien\" 16 Trying to connect to SimConnect Acc/SP2 Oct07 ... 16 FS UNC path = "\\FSX1\fsx\" 609 Run: "D:\fsx\Modules\linda.exe" 641 LogOptions=00000000 00000001 641 SIM1 Frictions access gained 641 Wind smoothing fix is fully installed 641 G3D.DLL fix attempt installed ok 641 SimConnect_Open succeeded: waiting to check version okay 641 Trying to use SimConnect Acc/SP2 Oct07 672 VRI port 1 "com3" opened 1703 Running in "Microsoft Flight Simulator X", Version: 10.0.61637.0 (SimConnect: 10.0.61259.0) 1703 Initialising SimConnect data requests now 1703 FSUIPC Menu entry added 1734 C:\Dokumente und Einstellungen\FSX\Eigene Dateien\Flight Simulator X-Dateien\DUS Standard.FLT 1734 \\FSX1\fsx\SimObjects\Airplanes\a320 FMGS JH Project Airbus A320-214\pa320-cfm56-2.AIR 2219 VRI FMER ("MCP Combi") detected on port com3 32734 System time = 23/11/2013 14:21:39, Simulator time = 14:21:09 (14:21Z) 32844 Aircraft="a320 FMGS JH Project Airbus A320-214" 33734 Starting everything now ... 33734 LUA.0: beginning "D:\fsx\Modules\ipcReady.lua" 33734 LUA.0: ended "D:\fsx\Modules\ipcReady.lua" 33734 AES Link established 33734 Run: "C:\Programme\IOCards\iocard.exe" 33750 LUA.1: 33750 LUA.1: [iNIT]LINDA:: Loading... 33953 LUA.1: LINDA:: Aircraft: a320 FMGS JH Project Airbus A320-21 33953 LUA.1: LINDA:: Aircraft module detected: a320 FMGS JH Project Airbus A320-214 34000 LUA.0: LINDA:: AivlaSoft library loaded... 34016 LUA.0: LINDA:: FSX standard library loaded... 34031 LUA.0: LINDA:: IVAO library loaded... 34031 LUA.0: LINDA:: RealityXP library loaded... 34031 LUA.0: LINDA:: Weather library loaded... 34047 LUA.0: LINDA:: A2A MAP library loaded... 35063 Advanced Weather Interface Enabled 35250 LUA.0: LINDA:: RADIOS : Empty command for :: COM1 Select 36656 LUA.0: LINDA:: Module: a320 FMGS JH Project Airbus A320-214 Started... 36656 LUA.0: LINDA:: Ready to go, Captain! 36656 LUA.0: LINDA:: 38063 LUA.0: LINDA:: Offsets watching list cleared! 389047 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 389703 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 390141 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 390563 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 391297 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 391625 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 391891 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 392281 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 392813 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) The actions file from jeehell as base for the MCP profile------------------------------------------------------------------------------- -- JeeHell FMGS function EvTimer (Time) AP_SPD = ipc.readSW(0x73C1) AP_HDG = ipc.readSW(0x73C3) AP_ALT = ipc.readSW(0x73C5) CPT_QNH = ipc.readSW(0x73C8) dispSPD(AP_SPD) dispHDG(AP_HDG) dispALT(AP_ALT) end -- Initial variables function InitVars () AP_SPD = 100 AP_HDG = 0 AP_ALT = 100 AP_VS = 0 CPT_QNH = 1013 inHg = false SPDmode = true HDGmode = true ALT_100 = true event.timer(500, "EvTimer") end -- ## FCU controls ##################################### function FCU_AP1 () ipc.writeUB(0x78eb,9) end function FCU_AP2 () ipc.writeUB(0x78eb,10) end function FCU_ATHR () ipc.writeUB(0x78eb,11) end function FCU_LOC () ipc.writeUB(0x78eb,13) end function FCU_APPR () ipc.writeUB(0x78eb,12) end function FCU_EXPED () ipc.writeUB(0x78eb,14) end function FCU_HDG_selected () ipc.writeUB(0x78eb,3) end function FCU_HDG_managed () ipc.writeUB(0x78eb,4) end function FCU_HDG_inc () AP_HDG = AP_HDG + 1 if AP_HDG > 359 then AP_HDG = 0 end ipc.writeUB(0x73CC,2) ipc.writeUW(0x73CD,AP_HDG) DispHDG(AP_HDG) end function FCU_HDG_dec () AP_HDG = AP_HDG - 1 if AP_HDG < 0 then AP_HDG = 359 end ipc.writeUB(0x73CC,2) ipc.writeUW(0x73CD,AP_HDG) DispHDG(AP_HDG) end function FCU_HDG_fastinc () AP_HDG = AP_HDG + 2 if AP_HDG > 359 then AP_HDG = 0 end ipc.writeUB(0x73CC,2) ipc.writeUW(0x73CD,AP_HDG) DispHDG(AP_HDG) end function FCU_HDG_fastdec () AP_HDG = AP_HDG - 2 if AP_HDG < 0 then AP_HDG = 359 end ipc.writeUB(0x73CC,2) ipc.writeUW(0x73CD,AP_HDG) DispHDG(AP_HDG) end function FCU_SPD_selected () ipc.writeUB(0x78eb,1) end function FCU_SPD_managed () ipc.writeUB(0x78eb,2) end function FCU_SPD_inc () if spdmode == true then AP_SPD = AP_SPD + 1 if AP_SPD > 399 then AP_SPD = 399 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) else AP_SPD = AP_SPD + 1 if AP_SPD > 99 then AP_SPD = 99 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) end DispSPD(AP_SPD) end function FCU_SPD_dec () if spdmode == true then AP_SPD = AP_SPD - 1 if AP_SPD < 100 then AP_SPD = 100 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) else AP_SPD = AP_SPD - 1 if AP_SPD < 10 then AP_SPD = 10 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) end DispSPD(AP_SPD) end function FCU_SPD_fastinc () if spdmode == true then AP_SPD = AP_SPD + 2 if AP_SPD > 399 then AP_SPD = 399 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) else AP_SPD = AP_SPD + 2 if AP_SPD > 99 then AP_SPD = 99 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) end DispSPD(AP_SPD) end function FCU_SPD_fastdec () if spdmode == true then AP_SPD = AP_SPD - 2 if AP_SPD < 100 then AP_SPD = 100 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) else AP_SPD = AP_SPD - 2 if AP_SPD < 10 then AP_SPD = 10 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) end DispSPD(AP_SPD) end function FCU_ALT_selected () ipc.writeUB(0x78eb,5) end function FCU_ALT_managed () ipc.writeUB(0x78eb,6) end function FCU_ALT_inc () if ALT_100 == true then AP_ALT = AP_ALT + 1 else AP_ALT = AP_ALT + 10 end if AP_ALT > 490 then AP_ALT = 490 end ipc.writeUB(0x73CC,3) ipc.writeUW(0x73CD,AP_ALT) DispALT(AP_ALT) end function FCU_ALT_dec () if ALT_100 == true then AP_ALT = AP_ALT - 1 else AP_ALT = AP_ALT - 10 end if AP_ALT < 1 then AP_ALT = 1 end ipc.writeUB(0x73CC,3) ipc.writeUW(0x73CD,AP_ALT) DispALT(AP_ALT) end function FCU_ALT_fastinc () if ALT_100 == true then AP_ALT = AP_ALT + 2 else AP_ALT = AP_ALT + 20 end if AP_ALT > 490 then AP_ALT = 490 end ipc.writeUB(0x73CC,3) ipc.writeUW(0x73CD,AP_ALT) DispALT(AP_ALT) end function FCU_ALT_fastdec () if ALT_100 == true then AP_ALT = AP_ALT - 2 else AP_ALT = AP_ALT - 20 end if AP_ALT < 1 then AP_ALT = 1 end ipc.writeUB(0x73CC,3) ipc.writeUW(0x73CD,AP_ALT) DispALT(AP_ALT) end function FCU_VS_push () ipc.writeUB(0x78eb,8) end function FCU_VS_pull () ipc.writeUB(0x78eb,7) end function FCU_VS_inc () if HDGmode == true then AP_VS = AP_VS + 100 if AP_VS > 6000 then AP_VS = 6000 end else AP_VS = AP_VS + 1 if AP_VS > 99 then AP_VS = 99 end end ipc.writeUB(0x73CC,4) ipc.writeUW(0x73CD,AP_VS) DispVS(AP_VS) end function FCU_VS_dec () if HDGmode == true then AP_VS = AP_VS - 100 if AP_VS < -6000 then AP_VS = -6000 end else AP_VS = AP_VS - 1 if AP_VS < -99 then AP_VS = -99 end end ipc.writeUB(0x73CC,4) ipc.writeUW(0x73CD,AP_VS) DispVS(AP_VS) end function FCU_VS_fastinc () if HDGmode == true then AP_VS = AP_VS + 200 if AP_VS > 6000 then AP_VS = 6000 end else AP_VS = AP_VS + 2 if AP_VS > 99 then AP_VS = 99 end end ipc.writeUB(0x73CC,4) ipc.writeUW(0x73CD,AP_VS) DispVS(AP_VS) end function FCU_VS_fastdec () if HDGmode == true then AP_VS = AP_VS - 200 if AP_VS < -6000 then AP_VS = -6000 end else AP_VS = AP_VS - 2 if AP_VS < -99 then AP_VS = -99 end end ipc.writeUB(0x73CC,4) ipc.writeUW(0x73CD,AP_VS) DispVS(AP_VS) end function FCU_SPDMACH () ipc.writeUB(0x78eb,16) SPDmode = not SPDmode end function FCU_VSFPA () ipc.writeUB(0x78eb,15) HDGmode = not HDGmode end function FCU_METRIC_ALT () ipc.writeUB(0x78eb,17) end function FCU_ALT100 () ALT_100 = true end function FCU_ALT1000 () ALT_100 = false end function FCU_ALT100_1000_toggle () ALT_100 = not ALT_100 end function DispSPD (value) if _MCP1 () then DspSPD (math.abs(value)) else if value == -999 then DspSPDs('---') elseif SPDmode==false then DspSPDs('.' .. tostring(value)) else DspSPD (value) end end end function DispHDG (value) if _MCP1 () then DspHDG (math.abs(value)) else if value == -999 then DspSPDs('---') else DspSPD (value) end end end function DispALT (value) DspALT (round(value/100)) end function DispVS (vvs) if _MCP1 () then local val = tostring(math.abs(vvs / 10)) while string.len(val) < 3 do val = '0' .. val end if vvs == 0 then val = ' 00 ' elseif vvs > 0 then val = '+' .. val else val = '-' .. val end DspShow (" VS ", val) else DspVVS(vvs/100) end end -- ## CPT EFIS controls ##################################### function CPT_EFIS_FD () ipc.writeUB(0x78eb,18) end function CPT_EFIS_LS () ipc.writeUB(0x78eb,19) end function CPT_EFIS_WPT () ipc.writeUB(0x78eb,69) end function CPT_EFIS_ARPT () ipc.writeUB(0x78eb,72) end function CPT_EFIS_VORD () ipc.writeUB(0x78eb,70) end function CPT_EFIS_NDB() ipc.writeUB(0x78eb,71) end function CPT_EFIS_CSTR () ipc.writeUB(0x78eb,68) end function CPT_EFIS_NAV1_VOR1 () ipc.writeUB(0x78eb,37) end function CPT_EFIS_NAV1_ADF1 () ipc.writeUB(0x78eb,38) end function CPT_EFIS_NAV1_OFF () ipc.writeUB(0x78eb,39) end function CPT_EFIS_NAV2_VOR2 () ipc.writeUB(0x78eb,40) end function CPT_EFIS_NAV2_ADF2 () ipc.writeUB(0x78eb,41) end function CPT_EFIS_NAV2_OFF () ipc.writeUB(0x78eb,42) end function CPT_EFIS_inHg () inHg = true ipc.writeUB(0x78eb,22) end function CPT_EFIS_mb () inHg = false ipc.writeUB(0x78eb,23) end function CPT_EFIS_mb_inHg_toggle () end function CPT_EFIS_QNH_push () ipc.writeUB(0x78eb,21) end function CPT_EFIS_QNH_pull () ipc.writeUB(0x78eb,20) end function CPT_EFIS_QNH_toggle () if inHg == true then ipc.writeUB(0x78eb,23) else ipc.writeUB(0x78eb,23) end inHg = not inHg end function CPT_EFIS_QNH_inc () CPT_QNH = CPT_QNH + 1 if CPT_QNH > 1050 then CPT_QNH = 1050 end ipc.writeUB(0x73CC,5) ipc.writeUW(0x73CD,CPT_QNH) end function CPT_EFIS_QNH_dec () CPT_QNH = CPT_QNH - 1 if CPT_QNH < 930 then CPT_QNH = 930 end ipc.writeUB(0x73CC,5) ipc.writeUW(0x73CD,CPT_QNH) end function CPT_EFIS_RANGE_10 () ipc.writeUW(0x78EB,31) end function CPT_EFIS_RANGE_20 () ipc.writeUW(0x78EB,32) end function CPT_EFIS_RANGE_40 () ipc.writeUW(0x78EB,33) end function CPT_EFIS_RANGE_80 () ipc.writeUW(0x78EB,34) end function CPT_EFIS_RANGE_160 () ipc.writeUW(0x78EB,35) end function CPT_EFIS_RANGE_320 () ipc.writeUW(0x78EB,36) end function CPT_EFIS_NDMODE_ILS () ipc.writeUW(0x78EB,26) end function CPT_EFIS_NDMODE_VOR () ipc.writeUW(0x78EB,27) end function CPT_EFIS_NDMODE_NAV () ipc.writeUW(0x78EB,28) end function CPT_EFIS_NDMODE_ARC () ipc.writeUW(0x78EB,29) end function CPT_EFIS_NDMODE_PLAN () ipc.writeUW(0x78EB,30) end
  3. Hello, i have a problem with Linda and the Jeehell FMGS Software. The programmer from the jeehell software has created a actions.lua file for Linda to make the MCP Combo 1 working with the jeehell software package. I have created the profil for linda with this actions.lua file, but it do not work. Linda and fsuipc are ok because with the default FSX planes it works quite good. The displays on the combo are not synchron with the jeehell FCU displays and at first time i have only the HDG rotary programmed and 2 keys für QNH switching. When i use the HDG rotary and the keys there is no function on the jeehell FCU and the fsuipc log gives a lua error. I am not a programmer so i need a little bit help for this problem, has somebody any idea ? BR Veit Here the fsuipc log: ******** FSUIPC4, Version 4.921f by Pete Dowson ********* Running inside FSX Module base=077C0000 User Name="" User Addr="" FSUIPC4 Key is provided WideFS7 Key is provided 0 System time = 23/11/2013 14:21:06 0 FLT UNC path = "C:\Dokumente und Einstellungen\FSX\Eigene Dateien\Flight Simulator X-Dateien\" 16 Trying to connect to SimConnect Acc/SP2 Oct07 ... 16 FS UNC path = "\\FSX1\fsx\" 609 Run: "D:\fsx\Modules\linda.exe" 641 LogOptions=00000000 00000001 641 SIM1 Frictions access gained 641 Wind smoothing fix is fully installed 641 G3D.DLL fix attempt installed ok 641 SimConnect_Open succeeded: waiting to check version okay 641 Trying to use SimConnect Acc/SP2 Oct07 672 VRI port 1 "com3" opened 1703 Running in "Microsoft Flight Simulator X", Version: 10.0.61637.0 (SimConnect: 10.0.61259.0) 1703 Initialising SimConnect data requests now 1703 FSUIPC Menu entry added 1734 C:\Dokumente und Einstellungen\FSX\Eigene Dateien\Flight Simulator X-Dateien\DUS Standard.FLT 1734 \\FSX1\fsx\SimObjects\Airplanes\a320 FMGS JH Project Airbus A320-214\pa320-cfm56-2.AIR 2219 VRI FMER ("MCP Combi") detected on port com3 32734 System time = 23/11/2013 14:21:39, Simulator time = 14:21:09 (14:21Z) 32844 Aircraft="a320 FMGS JH Project Airbus A320-214" 33734 Starting everything now ... 33734 LUA.0: beginning "D:\fsx\Modules\ipcReady.lua" 33734 LUA.0: ended "D:\fsx\Modules\ipcReady.lua" 33734 AES Link established 33734 Run: "C:\Programme\IOCards\iocard.exe" 33750 LUA.1: 33750 LUA.1: [iNIT]LINDA:: Loading... 33953 LUA.1: LINDA:: Aircraft: a320 FMGS JH Project Airbus A320-21 33953 LUA.1: LINDA:: Aircraft module detected: a320 FMGS JH Project Airbus A320-214 34000 LUA.0: LINDA:: AivlaSoft library loaded... 34016 LUA.0: LINDA:: FSX standard library loaded... 34031 LUA.0: LINDA:: IVAO library loaded... 34031 LUA.0: LINDA:: RealityXP library loaded... 34031 LUA.0: LINDA:: Weather library loaded... 34047 LUA.0: LINDA:: A2A MAP library loaded... 35063 Advanced Weather Interface Enabled 35250 LUA.0: LINDA:: RADIOS : Empty command for :: COM1 Select 36656 LUA.0: LINDA:: Module: a320 FMGS JH Project Airbus A320-214 Started... 36656 LUA.0: LINDA:: Ready to go, Captain! 36656 LUA.0: LINDA:: 38063 LUA.0: LINDA:: Offsets watching list cleared! 389047 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 389703 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 390141 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 390563 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 391297 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 391625 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 391891 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 392281 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) 392813 *** LUA Error: D:\fsx\modules\linda/system/handlers-mcp.lua:664: attempt to concatenate global 'HDGmode' (a boolean value) Here the actions lua file from Jeehell ------------------------------------------------------------------------------------------ - JeeHell FMGS function EvTimer (Time) AP_SPD = ipc.readSW(0x73C1) AP_HDG = ipc.readSW(0x73C3) AP_ALT = ipc.readSW(0x73C5) CPT_QNH = ipc.readSW(0x73C8) dispSPD(AP_SPD) dispHDG(AP_HDG) dispALT(AP_ALT) end -- Initial variables function InitVars () AP_SPD = 100 AP_HDG = 0 AP_ALT = 100 AP_VS = 0 CPT_QNH = 1013 inHg = false SPDmode = true HDGmode = true ALT_100 = true event.timer(500, "EvTimer") end -- ## FCU controls ##################################### function FCU_AP1 () ipc.writeUB(0x78eb,9) end function FCU_AP2 () ipc.writeUB(0x78eb,10) end function FCU_ATHR () ipc.writeUB(0x78eb,11) end function FCU_LOC () ipc.writeUB(0x78eb,13) end function FCU_APPR () ipc.writeUB(0x78eb,12) end function FCU_EXPED () ipc.writeUB(0x78eb,14) end function FCU_HDG_selected () ipc.writeUB(0x78eb,3) end function FCU_HDG_managed () ipc.writeUB(0x78eb,4) end function FCU_HDG_inc () AP_HDG = AP_HDG + 1 if AP_HDG > 359 then AP_HDG = 0 end ipc.writeUB(0x73CC,2) ipc.writeUW(0x73CD,AP_HDG) DispHDG(AP_HDG) end function FCU_HDG_dec () AP_HDG = AP_HDG - 1 if AP_HDG < 0 then AP_HDG = 359 end ipc.writeUB(0x73CC,2) ipc.writeUW(0x73CD,AP_HDG) DispHDG(AP_HDG) end function FCU_HDG_fastinc () AP_HDG = AP_HDG + 2 if AP_HDG > 359 then AP_HDG = 0 end ipc.writeUB(0x73CC,2) ipc.writeUW(0x73CD,AP_HDG) DispHDG(AP_HDG) end function FCU_HDG_fastdec () AP_HDG = AP_HDG - 2 if AP_HDG < 0 then AP_HDG = 359 end ipc.writeUB(0x73CC,2) ipc.writeUW(0x73CD,AP_HDG) DispHDG(AP_HDG) end function FCU_SPD_selected () ipc.writeUB(0x78eb,1) end function FCU_SPD_managed () ipc.writeUB(0x78eb,2) end function FCU_SPD_inc () if spdmode == true then AP_SPD = AP_SPD + 1 if AP_SPD > 399 then AP_SPD = 399 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) else AP_SPD = AP_SPD + 1 if AP_SPD > 99 then AP_SPD = 99 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) end DispSPD(AP_SPD) end function FCU_SPD_dec () if spdmode == true then AP_SPD = AP_SPD - 1 if AP_SPD < 100 then AP_SPD = 100 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) else AP_SPD = AP_SPD - 1 if AP_SPD < 10 then AP_SPD = 10 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) end DispSPD(AP_SPD) end function FCU_SPD_fastinc () if spdmode == true then AP_SPD = AP_SPD + 2 if AP_SPD > 399 then AP_SPD = 399 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) else AP_SPD = AP_SPD + 2 if AP_SPD > 99 then AP_SPD = 99 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) end DispSPD(AP_SPD) end function FCU_SPD_fastdec () if spdmode == true then AP_SPD = AP_SPD - 2 if AP_SPD < 100 then AP_SPD = 100 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) else AP_SPD = AP_SPD - 2 if AP_SPD < 10 then AP_SPD = 10 end ipc.writeUB(0x73CC,1) ipc.writeUW(0x73CD,AP_SPD) end DispSPD(AP_SPD) end function FCU_ALT_selected () ipc.writeUB(0x78eb,5) end function FCU_ALT_managed () ipc.writeUB(0x78eb,6) end function FCU_ALT_inc () if ALT_100 == true then AP_ALT = AP_ALT + 1 else AP_ALT = AP_ALT + 10 end if AP_ALT > 490 then AP_ALT = 490 end ipc.writeUB(0x73CC,3) ipc.writeUW(0x73CD,AP_ALT) DispALT(AP_ALT) end function FCU_ALT_dec () if ALT_100 == true then AP_ALT = AP_ALT - 1 else AP_ALT = AP_ALT - 10 end if AP_ALT < 1 then AP_ALT = 1 end ipc.writeUB(0x73CC,3) ipc.writeUW(0x73CD,AP_ALT) DispALT(AP_ALT) end function FCU_ALT_fastinc () if ALT_100 == true then AP_ALT = AP_ALT + 2 else AP_ALT = AP_ALT + 20 end if AP_ALT > 490 then AP_ALT = 490 end ipc.writeUB(0x73CC,3) ipc.writeUW(0x73CD,AP_ALT) DispALT(AP_ALT) end function FCU_ALT_fastdec () if ALT_100 == true then AP_ALT = AP_ALT - 2 else AP_ALT = AP_ALT - 20 end if AP_ALT < 1 then AP_ALT = 1 end ipc.writeUB(0x73CC,3) ipc.writeUW(0x73CD,AP_ALT) DispALT(AP_ALT) end function FCU_VS_push () ipc.writeUB(0x78eb,8) end function FCU_VS_pull () ipc.writeUB(0x78eb,7) end function FCU_VS_inc () if HDGmode == true then AP_VS = AP_VS + 100 if AP_VS > 6000 then AP_VS = 6000 end else AP_VS = AP_VS + 1 if AP_VS > 99 then AP_VS = 99 end end ipc.writeUB(0x73CC,4) ipc.writeUW(0x73CD,AP_VS) DispVS(AP_VS) end function FCU_VS_dec () if HDGmode == true then AP_VS = AP_VS - 100 if AP_VS < -6000 then AP_VS = -6000 end else AP_VS = AP_VS - 1 if AP_VS < -99 then AP_VS = -99 end end ipc.writeUB(0x73CC,4) ipc.writeUW(0x73CD,AP_VS) DispVS(AP_VS) end function FCU_VS_fastinc () if HDGmode == true then AP_VS = AP_VS + 200 if AP_VS > 6000 then AP_VS = 6000 end else AP_VS = AP_VS + 2 if AP_VS > 99 then AP_VS = 99 end end ipc.writeUB(0x73CC,4) ipc.writeUW(0x73CD,AP_VS) DispVS(AP_VS) end function FCU_VS_fastdec () if HDGmode == true then AP_VS = AP_VS - 200 if AP_VS < -6000 then AP_VS = -6000 end else AP_VS = AP_VS - 2 if AP_VS < -99 then AP_VS = -99 end end ipc.writeUB(0x73CC,4) ipc.writeUW(0x73CD,AP_VS) DispVS(AP_VS) end function FCU_SPDMACH () ipc.writeUB(0x78eb,16) SPDmode = not SPDmode end function FCU_VSFPA () ipc.writeUB(0x78eb,15) HDGmode = not HDGmode end function FCU_METRIC_ALT () ipc.writeUB(0x78eb,17) end function FCU_ALT100 () ALT_100 = true end function FCU_ALT1000 () ALT_100 = false end function FCU_ALT100_1000_toggle () ALT_100 = not ALT_100 end function DispSPD (value) if _MCP1 () then DspSPD (math.abs(value)) else if value == -999 then DspSPDs('---') elseif SPDmode==false then DspSPDs('.' .. tostring(value)) else DspSPD (value) end end end function DispHDG (value) if _MCP1 () then DspHDG (math.abs(value)) else if value == -999 then DspSPDs('---') else DspSPD (value) end end end function DispALT (value) DspALT (round(value/100)) end function DispVS (vvs) if _MCP1 () then local val = tostring(math.abs(vvs / 10)) while string.len(val) < 3 do val = '0' .. val end if vvs == 0 then val = ' 00 ' elseif vvs > 0 then val = '+' .. val else val = '-' .. val end DspShow (" VS ", val) else DspVVS(vvs/100) end end -- ## CPT EFIS controls ##################################### function CPT_EFIS_FD () ipc.writeUB(0x78eb,18) end function CPT_EFIS_LS () ipc.writeUB(0x78eb,19) end function CPT_EFIS_WPT () ipc.writeUB(0x78eb,69) end function CPT_EFIS_ARPT () ipc.writeUB(0x78eb,72) end function CPT_EFIS_VORD () ipc.writeUB(0x78eb,70) end function CPT_EFIS_NDB() ipc.writeUB(0x78eb,71) end function CPT_EFIS_CSTR () ipc.writeUB(0x78eb,68) end function CPT_EFIS_NAV1_VOR1 () ipc.writeUB(0x78eb,37) end function CPT_EFIS_NAV1_ADF1 () ipc.writeUB(0x78eb,38) end function CPT_EFIS_NAV1_OFF () ipc.writeUB(0x78eb,39) end function CPT_EFIS_NAV2_VOR2 () ipc.writeUB(0x78eb,40) end function CPT_EFIS_NAV2_ADF2 () ipc.writeUB(0x78eb,41) end function CPT_EFIS_NAV2_OFF () ipc.writeUB(0x78eb,42) end function CPT_EFIS_inHg () inHg = true ipc.writeUB(0x78eb,22) end function CPT_EFIS_mb () inHg = false ipc.writeUB(0x78eb,23) end function CPT_EFIS_mb_inHg_toggle () end function CPT_EFIS_QNH_push () ipc.writeUB(0x78eb,21) end function CPT_EFIS_QNH_pull () ipc.writeUB(0x78eb,20) end function CPT_EFIS_QNH_toggle () if inHg == true then ipc.writeUB(0x78eb,23) else ipc.writeUB(0x78eb,23) end inHg = not inHg end function CPT_EFIS_QNH_inc () CPT_QNH = CPT_QNH + 1 if CPT_QNH > 1050 then CPT_QNH = 1050 end ipc.writeUB(0x73CC,5) ipc.writeUW(0x73CD,CPT_QNH) end function CPT_EFIS_QNH_dec () CPT_QNH = CPT_QNH - 1 if CPT_QNH < 930 then CPT_QNH = 930 end ipc.writeUB(0x73CC,5) ipc.writeUW(0x73CD,CPT_QNH) end function CPT_EFIS_RANGE_10 () ipc.writeUW(0x78EB,31) end function CPT_EFIS_RANGE_20 () ipc.writeUW(0x78EB,32) end function CPT_EFIS_RANGE_40 () ipc.writeUW(0x78EB,33) end function CPT_EFIS_RANGE_80 () ipc.writeUW(0x78EB,34) end function CPT_EFIS_RANGE_160 () ipc.writeUW(0x78EB,35) end function CPT_EFIS_RANGE_320 () ipc.writeUW(0x78EB,36) end function CPT_EFIS_NDMODE_ILS () ipc.writeUW(0x78EB,26) end function CPT_EFIS_NDMODE_VOR () ipc.writeUW(0x78EB,27) end function CPT_EFIS_NDMODE_NAV () ipc.writeUW(0x78EB,28) end function CPT_EFIS_NDMODE_ARC () ipc.writeUW(0x78EB,29) end function CPT_EFIS_NDMODE_PLAN () ipc.writeUW(0x78EB,30) end
×
×
  • Create New...