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!
The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!
See you on our MobiFlight Community Discord server.
A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.
The forum is still providing a lot of good content, hence we keep this information accessible.
function Autopilot_ATHR(offset,value)
if (value == 1) then ipc.writeLvar("L:AB_AP_ATHR",1)
else ipc.writeLvar("L:AB_AP_ATHR",0)
end
end
event.offset("66C0","UB","Autopilot_ATHR")
ipc.writeSB(0x66C1, 0) // Here you define the Offset 66C1 to 0
offsetValue = ipc.readSB(0x66C1); // Here you read the Offset and save it to the Variable
if offsetValue ~= ATT_cur then // Here i not understand WHERE do you define or readout "ATT_cur" ( Logical it is the Value of the LVAR But how you define it ?)
ipc.writeLvar("L:AB_AP_ATHR", offsetValue) // Here you Write the current value of Offset 66C1 to the LVAR WHY ???
end
Hello
Thanks to your help I managed to assign an entry to Aerosoft Airbus by assigning offset 0x66C0 to the Throttle autopilot assignment, but I can not turn on the respective led when the function is switched off according to offset 0x66C1. I write the lua command to verify the string:
function Autopilot_ATHR(offset,value)
if (value == 1) then ipc.writeLvar("L:AB_AP_ATHR",1)
else ipc.writeLvar("L:AB_AP_ATHR",0)
end
end
event.offset("66C0","UB","Autopilot_ATHR")
ipc.writeSB(0x66C1, 0)
offsetValue = ipc.readSB(0x66C1);
if offsetValue ~= ATT_cur then
ipc.writeLvar("L:AB_AP_ATHR", offsetValue)
end
Thanks in advance for the given collaboration.