December 7, 20223 yr I haven't had a chance to test this out yet, but you may want to try this: 1) First, locate, then copy the fsuipc.ini file and save it somewhere on your drive as a backup, then open the original file. Look for the entry heading [LuaFiles]. If you do not see one, create one after the [Axes] and [Keys] entries. 2) Next, remove these two Lua names from the [LuaFiles] section if they are there:1) Alt_Inc, and 2) Alt_Dec 3) Next, place this file (save it as alt_var_custom.lua) in the FSUIPC folder that also holds your LINDA files: function alt_var_custom () function AltitudeSet_Up () a = ipc.readLvar ("L:CUSTOM_AP_ALT_VAR_SET_ENGLISH") a = a + 1000 ipc.writeLvar ("L:CUSTOM_AP_ALT_VAR_SET_ENGLISH", a) end function AltitudeSet_Down () a = ipc.readLvar ("L:CUSTOM_AP_ALT_VAR_SET_ENGLISH") if a<=1000 then a=0 ipc.writeLvar ("L:CUSTOM_AP_ALT_VAR_SET_ENGLISH", a) else a = a - 1000 ipc.writeLvar ("L:CUSTOM_AP_ALT_VAR_SET_ENGLISH", a) end end event.control (65892,“AltitudeSet_Up”) AltitudeSet_Up (65892) event.control (65893,“AltitudeSet_Down”) AltitudeSet_Up (65893) end 4) Finally, add the Lua name alt_var_custom using the next sequential numeric value to the [LuaFiles] section. If this works correctly (no guarantees since I haven't been able to test it since I didn't have a multipanel until late last night) you shouldn't have to assign anything to get this to work; it'll load at initial start-up and run in the background. ~Masterius
December 9, 20223 yr Author Hello Masterius, I did all steps. Then I assigned the rotary encoder via mobiflight to the events 65892 for right turn up and 65893 for left turn down. The Alt preseletor stays at zero, but I can move this margenta marker according the rotation. Maybe should I try diffenert events - for instance 66124 AP_ALT_VAR_SET_ENGLISH. Another question is, which number goes into the para field. Without a number, the assigment doesen't work. Very, very thanks again for your support best regards Franz
December 14, 20223 yr OK, I don't have your aircraft so I've no access to your Lvars, so lets give this a try: 1) Copy and paste this into a text file, then save it as alt_set.lua function alt_set () function AltitudeSet_Down () a = ipc.readLvar ("L:CUSTOM_AP_ALT_VAR_SET_ENGLISH") if a<=1000 then a=0 ipc.writeLvar ("L:CUSTOM_AP_ALT_VAR_SET_ENGLISH", a) else a = a - 1000 ipc.writeLvar ("L:CUSTOM_AP_ALT_VAR_SET_ENGLISH", a) end end event.control(65893,“AltitudeSet_Down”) function AltitudeSet_Up () a = ipc.readLvar ("L:CUSTOM_AP_ALT_VAR_SET_ENGLISH") a = a + 1000 ipc.writeLvar ("L:CUSTOM_AP_ALT_VAR_SET_ENGLISH", a) end event.control(65892,“AltitudeSet_Up”) end 2) Copy and paste alt_set.lua into your FSUIPC modules folder (dependent on the sim you are using; this will be the folder where LINDA.exe and FSUIPC.ini are located). 3) Save a copy of FSUIPC.ini, then open the original and add the lua to the [LuaFiles] section as n=alt_set, (where n is the next sequential numeral). 4) Find your specific aircraft within either FSUIPC.ini or within the "PROFILES" folder (this depends on whether you have FSUIPC set up to use aircraft profiles or not). Find the [AUTO] section; you should see at least an entry n=Lua LINDA (where n is a numeral). There may be others, dependent on if you have other auto-start luas. Add this entry at the bottom of the list: n=Lua alt_set. 5) Save and close FSUIPC.ini.
Archived
This topic is now archived and is closed to further replies.