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!
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.