February 27, 20206 yr Hi all, I am building a cockpit with real buttons. LINDA recognizes the installed USB joystick cards. Thus, I will be able to assign some aircraft functions. It is cool. But some hardware is driven by SIOC script language which could be used to manage an FSUIPC offset 3340 to trig a virtual joystick on buttons press/release. Do you know if I can retrieve an offset value from LINDA in order to assign the appropriate addon function ? Or if LINDA is only able (and it is even great) to deal with physical joystick conecnted to the PC instead ? Thanks Philippe
February 27, 20206 yr Hi Philippe LINDA uses FSUIPC offsets for much of its operation. You can use LUA code to read and write to specific offsets. The FSUIPC documentation (in /modules/fsuipc documents) list the 0x3340 as a area to access externally signalled joystick buttons. There are plenty of LUA examples in the provided LINDA code. Also see FSUIPC5 Offset Status and LUA Library documents for more information. Any functions you create should be placed in the user.lua file for the aircraft or in lib-user.lua for general use. Edited February 27, 20206 yr by ScotFlieger Andrew Gransden Scotland, UK LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew
February 28, 20206 yr Author Thanks for your quick reply ScottFlieger Yes i saw the FSUIPC Offset documentation and I can tweak the virtual joystick bits using the hardware switches. So you suggested I write a script in LUA with I think something like "ipc.read" to look into the offset I am using (ie $3340) and according the the bits flags, I could kick the appropriate LINDA function associated to the AddOn (LINDA aerosoft DHC-6 module), right ? I need to see where I can put this wrapper script in LINDA and how to run the requested LINDA function using LUA. I will have a look to the LINDA samples and let you know. it is quite mysthical for me today 😊 Have a nice week-end
February 28, 20206 yr Have fun. You will need the LUA instructions ipc.readXX and ipc.writeXX where XX is the size of the data block to be accessed. XX corresponds to the LINDA Tracer buttons UB = unsigned byte 8 bits, UW = unsigned word 16 bits, UD = unsigned double word 32 bits, etc). Andrew Gransden Scotland, UK LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew
April 3, 20206 yr Author Good morning, I just dig into that only now and i am blocked because I misunderstood something I think. Ok from FSUIPC I can trig my switches to fill the appropriate "virtual joystick" offset, then on the LINDA side, I can have a LUA script to loop and look for any changes in the offset. But how LINDA is kicked? I do not see how LINDA could be used to match the commands (like we can do using a classic joystick) and the ipc commands from the lua script. For me, it is like a panel is missing (like the MCP Combo) in LINDA to be able as a user, to assign the target simulator commands. I understand the LINDA idea is to use the mouse to assign the simulator command to the button we want using its great intuitive interface. And i am looking for having a bottom icon (like the joystick and MCP ones) to click then match the ipc to any simulator commands. Where I am wrong ? Bye
April 3, 20206 yr In the /Linda/aircrafts/{your aircraft}/user.lua file you will find a 1Hz timer function. You can put your offset read instructions in this function. you have me at a disadvantage as I have not used the virtual button functionality I don’t know how your scripts are working or how many offsets are available to use. Normally, a unique code would be passed by the source to identify what the data refers to. Your LINDA LUA code would then act on that information to select the correct action. Again I would prefer to see how LINDA could interact directly with the hardware. I suggest you investigate this route further. Andrew Gransden Scotland, UK LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew
April 3, 20206 yr Author Thanks for your reply. 1 hour ago, ScotFlieger said: In the /Linda/aircrafts/{your aircraft}/user.lua file you will find a 1Hz timer function Yes, the 1Hz timer function in the user.lua script is perfect to insert the code. About the "virtual joystick" don't be afraid, it is just a free FSUIPC offset (we have a wide range of such addresses available for personnal use). Like you already mentionned : On 2/27/2020 at 11:41 AM, ScotFlieger said: The FSUIPC documentation (in /modules/fsuipc documents) list the 0x3340 as a area to access externally signalled joystick buttons 2 hours ago, ScotFlieger said: Again I would prefer to see how LINDA could interact directly with the hardware. I suggest you investigate this route further Good idea. I will investigate on this path Have a nice week-end
April 3, 20206 yr Author I found this post. Same problematic 😎 OpenCockpit is the card manufacturer where the SIOC language is implemented 😉
April 4, 20206 yr @FlyPinguthank you for reminding of the previous discussion. SOIC and OpenCockpit is not something I can start on as the costs are excessive. LINDA receives only limited donations or relies on my buying add-ons and hardware. Andrew Gransden Scotland, UK LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew
April 4, 20206 yr Author @ScotFlieger No misunderstanding there. You are doing a great job. And thank you for that for the LINDA communauty. When I found this 2016 post witth a great explanation of the SIOC/FSUIPC OFFSET/ LINDA implementation, I thought it could help others lost like I was. It is noted for the LINDA donation 😉 You cannot have all the addon and hardware of the world...
Archived
This topic is now archived and is closed to further replies.