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!
Code:
function MobiFlight_Map_FSUIPC () -- write LVar to variable Bat_Lvar = ipc.readLvar("Battery1Switch") -- write FSUIPC value to variable Bat_Offset = ipc.readUD(0x66C0); -- if FSUIPC differs from LUA variable... if Bat_Lvar ~= BatOffset then ipc.writeLvar("Battery1Switch", BatOffset); end end
Code:
first = true while true do if first then first = false initialValue = ipc.readLvar("L:YOUR_SPECIFIC_VALUE") ipc.writeXX(0x66C0, initialValue) else currentValue = ipc.readXX(0x66C0) ipc.writeLvar("L:YOUR_SPECIFIC_VALUE", currentValue) end end
Code:
first = true while true do if first then first = false initialValue = ipc.readLvar("L:AB_AP_HDG_Select") ipc.writeSD(0x66C0, math.floor(initialValue*(65535/360)+1)) else currentValue = math.floor(ipc.readSD(0x66C0)*0.0054945054945055) ipc.writeLvar("L:AB_AP_HDG_Select", currentValue) end end
I found my answer in German part
I will test for the last time tomorrow. If everything works , I will post my lua files and mobiflight settings here.
About Update------------------
New update broke my mobiflight. It doesnt recognize my arduino board. I am using 6.0.2 for now.