MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

icon
Avatar
Pietrogramma
Posts: 19
HI, I'm building the Cessna C172 home cockpit, and I would like replace the panel annunciator, but I don't found any offset of the warnings of the panel.
I searched for tutorial or guides but I don't found nothing. Somebody say that replace the annunciator it's possible with Lua script, is true?
Thanks and ciao
2020-05-07 09:04
Avatar
GanGstaSouL
Posts: 1
Hello, it is possible by using an LUA code with LVARS ( ad don only ) or by using the offset of the gauge then use a condition for example for the voltage put 23 (for volt) and the led will light below 23 volt for example, for tanks, enter a gal value
cordially
[Last edited by GanGstaSouL, 2020-05-07 17:02]
2020-05-07 16:53
Avatar
Pietrogramma
Posts: 19
Hi, thanks for your reply...can you help me with Lua code? where I can found a tutorial for use it? Thnaks
2020-05-07 19:56
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3417
Supporter
Hi

Most users do this by making some transforms and claculations with the given Values in FSUIPC
If you plan to order a AddOn C172 then check if these AddOn support that Value directly on a Offset ( Much more Comfortable)

About Lua.....

You can google for this..... Lots of tutorials in the Web..... But take care. this is not a 10 Minute Video and you be able to do this. If you still know a programming language like C# this is easy..... but if you not get experince with scripting then calculate a much longer time !
I not want to push you in a special direction..... But leaning to build the MF Configs is pretty sure much more easy.
Good Luck !
2020-05-07 20:40
Avatar
Pietrogramma
Posts: 19
Hi Pizman82, The aircraft I use is the A2A C172. In this forum I read that Aurelien made it with LUA but, as you said, it is alien to me. I hope to find a script ready to put in the modules folder of P3d.
Since it's easier to do, I'm now googling a tutorial on how to "transforms and claculations with the given Values in FSUIPC".
Thanks and ciao
2020-05-08 09:07
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3417
Supporter
iconPietrogramma:

Hi Pizman82, The aircraft I use is the A2A C172.



This change the thematic

A2A not Support Data to FSUIPC. A2A Aircrafts need a LUA Script for most things.
Maybe you can use also the FSUIPC Data to build this Warninglight Panel but here i´m not sure.
Whatever here in Forum are lots of examples for LUA Scripts with A2A.... Please do some SEARCH with keywords "Lvars" or so. OR simply scroll through the Topics.

If i remember right "Hannes" a user from Austria build already a C172 with A2A as a Full Cockpit.... Mabye he read this and can give you more informations.

Check for example this hit by a search..... https://www.mobiflight.com/forum/topic/251.html
Good Luck !
2020-05-08 11:56
Avatar
Hannes
From: Austria
Posts: 154
Supporter
Hello, Due to some other functions I have given up the A2A again and am currently operating my home cockpit with a standard Cessna 172. But I still have the scripts and macros. I have attached to you. Check out the A2A forum. Are helpful posts included.

iconCode:
-- Eintrag für LINDA (kann ggf. entfernt werden)
ipc.runlua('linda')

while 1 do
 OilPressLight = ipc.readLvar("L:OilPressLight")
 VoltsLight = ipc.readLvar("L:VoltsLight")
 VacLLight = ipc.readLvar("L:VacLLight")
 VacLight = ipc.readLvar("L:VacLight")
 VacRLight = ipc.readLvar("L:VacRLight")
 FuelLLight = ipc.readLvar("L:FuelLLight")
 FuelLight = ipc.readLvar("L:FuelLight")
 FuelRLight = ipc.readLvar("L:FuelRLight")

 -- OilPres (Offset: 66C0)
 ipc.writeSB(0x66C0, OilPressLight)

 -- Volts (Offset: 66C1)
 ipc.writeSB(0x66C1, VoltsLight)

 -- VAC Left (Offset: 66C2)
 ipc.writeSB(0x66C2, VacLLight)
 
 -- VAC (Offset: 66C3)
 ipc.writeSB(0x66C3, VacLight)
 
 -- VAC Right (Offset: 66C4)
 ipc.writeSB(0x66C4, VacRLight)

 -- Fuel Left (Offset: 66C5)
 ipc.writeSB(0x66C5, FuelLLight)
 
 -- Fuel (Offset: 66C6)
 ipc.writeSB(0x66C6, FuelLight)
 
 -- Fuel Right (Offset: 66C7)
 ipc.writeSB(0x66C7, FuelRLight)
 
end


And the Macro File for many ather functions:

iconCode:
[MACROS]
1=L:FSelC172=SET
2=L:Eng1_GeneratorSwitch=TOGGLE
3=L:Battery1Switch=TOGGLE
4=L:Eng1_FuelCutOffSwitch=TOGGLE
5=L:CabinVent=SET
6=L:Eng1_FuelValve=TOGGLE
7=L:Headphones=TOGGLE
8=L:ControlsLockLever=TOGGLE
9=L:Eng1_FuelSelector=SET
10=L:LandingLightsON=TOGGLE
11=L:Eng1_StarterSwitch=SET
12=L:Headphones=TOGGLE
13=L:Eng1FuelCutOffSwitch=TOGGLE
14=L:Eng1_MixtureManualLever=SET
15=L:ElecPower=TOGGLE
16=L:CabinTempControl=CYCLIC
17=L:PedestalLightKnob=CYCLIC
18=L:PanelLightKnob=CYCLIC
19=L:GlareshieldLightSwitch=TOGGLE
20=L:RadioLightKnob=CYCLIC
21=L:Com1OnOff=TOGGLE
22=L:Com2OnOff=TOGGLE
23=L:Nav1StbySwitch=TOGGLE
24=L:Nav2StbySwitch=TOGGLE
25=L:kma26DmeSwitch=TOGGLE
26=L:FSelC172State=SET
27=L:kn62Function=CYCLIC
28=L:kn62OnOff=TOGGLE
29=L:kap140_ap_button=TOGGLE
30=L:kap140_hdg=TOGGLE
31=L:kap140_nav=TOGGLE
32=L:kap140_apr=TOGGLE
33=L:kap140_rev=TOGGLE
34=L:kap140_alt=TOGGLE
35=L:kap140_up_button=SET
36=L:kap140_dn_button=SET
37=L:kap140_arm=TOGGLE
38=L:kap140_baro_button=TOGGLE
39=L:AnnunciatorPanelTestSwitch=SET
40=L:AnnPanelTestSwitchPercent=SET
41=L:AnnPanelTestSwitchDrag=SET
42=L:AdfOnOffKnob=TOGGLE
43=L:AutopilotHeadingBug=SET
44=L:xpdr_onoff_knob_pos=CYCLIC
45=L:GpsOnSwitch=TOGGLE
46=L:WindowDefrosterControl1=CYCLIC
47=L:WindowDefrosterControl2=CYCLIC
48=L:GpsNavSelector=TOGGLE
49=L:Nav1PullIdent=SET
50=L:Nav2PullIdent=SET
51=L:kma26MkrSwitch=TOGGLE
52=L:kma26AdfSwitch=TOGGLE
53=L:kma26Nav1Switch=SET
54=L:kma26Nav2Switch=SET
55=L:kma26DmeSwitch=TOGGLE
56=L:kma26Nav1SwitchButton=TOGGLE
57=L:kma26Com1Switch=TOGGLE
58=L:kma26Com2Switch=TOGGLE
59=L:kma26Com3Switch=SET
60=L:ComPushButton=SET
61=L:kma26SelectorKnob_pos=SET
62=L:IntercomPushButtons=SET
www.modellbau-technik.at
hannes.dobersberger@modellbau-technik.at
2020-05-11 08:42
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3417
Supporter
Thank you Hannes for reply.

iconQuote:

Due to some other functions I have given up the A2A again and am currently operating my home cockpit with a standard Cessna 172.



Basicly a sad statement.
I not understand the market here.....
Technical much more people in the world fly a cessna ( or other GA) and only a verry rare group of Pilots are licence for B737/A320 ..... But there we got a couple of good AddOns and also each a Professional AddOn for 1200$+ .... BUT we only have trash AddOns for Cessna.
Also the Plattform.... FSUIPC is a bit old from technic but it workes and is stable AND it is supported perfectly by the Dowson Family and used by thousends of Homecockpits.
I not understand why A2A not take the chance and build there AddOn more compatible to it.

Whatever now comes my standard Statement from the last months..... I realy hope FS2020 is the long needed "game-changer" and the next step into 21 century. At the moment it looks like it will be.... So hopefully also the AddOn developer see this and release new Versions for it.... Using the new Plattforms that finaly also supported by Mobiflight.

Maybe i´m wrong but with a bit of luck we lough about "Lvars" in 1-2 Years and be happy with our perfect homecockpits then !
Good Luck !
2020-05-11 13:32
icon