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:
first = true while true do if first then initialALTVal = ipc.readLvar("L:AB_AP_ALT_Select") ipc.writeUD(0x66D5, initialALTVal) first = false else currentALTVal = ipc.readUD(0x66D5) ipc.writeLvar("L:AB_AP_ALT_Select", currentALTVal) end end
Code:
first = true while true do if first then initialALTVal = ipc.readLvar("L:AB_AP_ALT_Select") ipc.writeUD(0x66D5, initialALTVal) first = false else currentALTVal = ipc.readUD(0x66D5) ipc.writeLvar("L:AB_AP_ALT_Select", currentALTVal) end end
Code:
first = true wert_alt=0 // Variable für Zwischenspeicherung while true do if first then initialALTVal = ipc.readLvar("L:AB_AP_ALT_Select") ipc.writeUD(0x66D5, initialALTVal) wert_alt=initialALTVal // Wert initialisieren first = false else currentALTVal = ipc.readUD(0x66D5) if wert_alt != currentALTVal then // ungleich? ipc.writeLvar("L:AB_AP_ALT_Select", currentALTVal) // Sim schreiben wert_alt = currentALTVal // neuen Wert zuweisen end end end
Code:
first = true wert_alt=0 -- Variable für Zwischenspeicherung while true do if first then initialALTVal = ipc.readLvar("L:AB_AP_ALT_Select") ipc.writeUD(0x66D5, initialALTVal) wert_alt=initialALTVal -- Wert initialisieren first = false else currentALTVal = ipc.readUD(0x66D5) if wert_alt == currentALTVal then -- ungleich? !!! ANGEPASST !!! ipc.writeLvar("L:AB_AP_ALT_Select", currentALTVal) -- Sim schreiben wert_alt = currentALTVal -- neuen Wert zuweisen end end end
Code:
while true do -- Lese vom FS Panel currentATHRVal = ipc.readLvar("L:AB_AP_ATHR") currentALTVal = ipc.readLvar("L:AB_AP_ALT_Select") currentHDGVal = ipc.readLvar("L:AB_AP_HDG_Select") currentSPDVal = ipc.readLvar("L:AB_AP_SPEED_Select") -- Lese Altitude vom MF Encoder initialALTVal = ipc.readUW(0x66C7) -- Schreibe ins MF Display ipc.writeUW(0x66D1, currentATHRVal) ipc.writeUW(0x66D5, currentALTVal) ipc.writeUW(0x66F5, currentHDGVal) ipc.writeUW(0x66F7, currentSPDVal) if currentALTVal == initialALTVal then -- do nothing else ipc.writeLvar("L:AB_AP_ALT_Select", initialALTVal) -- Schreibe ALTITUDE ins FS Panel end end
Code:
if currentALTVal == initialALTVal then -- do nothing else ipc.writeLvar("L:AB_AP_ALT_Select", initialALTVal) -- Schreibe ALTITUDE ins FS Panel end
Code:
if currentALTVal ~= initialALTVal then ipc.writeLvar("L:AB_AP_ALT_Select", initialALTVal) -- Schreibe ALTITUDE ins FS Panel end