MD80PROJECT Posted June 21, 2022 Report Share Posted June 21, 2022 (edited) First of all I want to introduce myself, I've been running my own MADDOG X cockpit simulator project in Spain for a few years, and I've always liked aviation, that's why I also make a living from aviation, and simulators are my hobby. I needed your wisdom and great experience, since I found myself at the moment of starting the connections of my arduino cards to the PC and to the top panel and other panels. I have been testing with FSUIPC to make MACROS for the Input signals to Prepar3D and MADDOG X (I think I understand things but I still have to learn) But my biggest problem is understanding how (MADDOG X + FSUIPC6 + MOBIFLIGHT + LUA) works and how it all interacts for output signals. I want to start lighting my signs......such as Master Caution, Master Warning, Annunciator Panel Etc.... I have been talking on many occasions with more colleagues who are in this project like my friend "SISOFFI with his project in Italy" or with my friend "CLAUS who also has a mobile cockpit. But I don't want you to spend a lot of time on my problems, which are many, it would be a lot of time for me and for me to understand the basic operation of everything. For this reason I need if someone can tell me where to start....... I am interested in removing the output light from the simulator. I've seen the MADDOG_X.lua documents and more code but I haven't gotten them to work yet.... I have also been looking inside FSUIPC6.ini ........ the section [Auto] where it puts the name of the file with the code that you want to execute...... but it has not been successful either. ejemplo... FSUIPC6.ini [Auto] 3=master_caut master_caut.lua -- (L:CM1_mastercaut_adv1, enum) --> preferred type = UB or UW, NOTE - NEW Lvar name for MaddogX, , this is on CM1 only! The other is (L:CM2_mastercaut_adv1, enum), not provided function master_caut (varname, value) ipc.writeUD(0x674C, value) end event.Lvar("L:CM1_mastercaut_adv1", 100, "master_caut") -- NOTE - NEW Lvar name for MaddogX, this is on CM1 only! The other is (L:CM2_mastercaut_adv1, enum), not provided MOBIFLIGHT ( I have indicated which pin I want to feed and also GRD) and I have also indicated the offset (0x674C) I'm sure I'm doing a lot of things wrong. But I need someone to please tell me which route to follow to illuminate some of the MADDOG X indicator lights. I hope your help friends Thank you very much for attending me Greetings to all.😉☺️ Edited June 21, 2022 by MD80PROJECT Link to comment Share on other sites More sharing options...
John Dowson Posted June 22, 2022 Report Share Posted June 22, 2022 14 hours ago, MD80PROJECT said: he section [Auto] where it puts the name of the file with the code that you want to execute...... but it has not been successful either. ejemplo... FSUIPC6.ini [Auto] 3=master_caut You control the [Auto] section, and the format of that line is not correct - if the file is called master_caut.lua, then the [Auto] section entry to start that lua would be: 3=Lua master_caut Please see the Advanced User guide, section Automatic running of Macros and Lua plugins on page 41 if the Advanced User Guide. If you don't specify Lua, it us assumed you are trying to auto-start a macro file. 14 hours ago, MD80PROJECT said: MOBIFLIGHT ( I have indicated which pin I want to feed and also GRD) and I have also indicated the offset (0x674C) Not sure what this means - I do not use MobiFlight and cannot help with this. 14 hours ago, MD80PROJECT said: But I need someone to please tell me which route to follow to illuminate some of the MADDOG X indicator lights. You could always take a look at LINDA, which comes with a support module (i.e. lua scripts) for the Maddog X - see https://www.avsim.com/forums/topic/532362-leonardo-maddogx-module-13/. Even if you don't use LINDA, it may be worth taking a look at the scripts they provide to see how things work for that aircraft. But not that you cannot use the LINDA scripts without installing/using LINDA (due to dependencies). See https://www.avsim.com/forums/forum/424-linda/ for more information on LINDA. ¡Saludos desde Galicia! John Link to comment Share on other sites More sharing options...
MD80PROJECT Posted July 8, 2022 Author Report Share Posted July 8, 2022 (edited) Thank you very much for writing me John Dowson, I am glad to know that I have a Spanish compatriot in the forum. I wanted to apologize for taking so long to answer, I've been quite busy with work these weeks. Well, I've also tried doing what you tell me. I've put "lua" in front of each file name, but have had no success getting it to work. Mobiflight I understand that it is a way to link the simulator to the Arduino card, with this program you link because the electrical connection PIN you want the signal to outputs to light an LED for example as in my case or instead it also allows you to make inputs like a switch , for example. I am going to continue researching and reading on this topic and test if I am successful. If there is any other idea of what I can do for me, it is very welcome. Thank you so much 😉 regards Edited July 8, 2022 by MD80PROJECT Link to comment Share on other sites More sharing options...
John Dowson Posted July 8, 2022 Report Share Posted July 8, 2022 On 7/8/2022 at 11:46 AM, MD80PROJECT said: I've put "lua" in front of each file name, but have had no success getting it to work. Please show me/attach your FSUIPC6.ini and FSUIPC6.log files. On 7/8/2022 at 11:46 AM, MD80PROJECT said: If there is any other idea of what I can do for me, it is very welcome. Try the MobiFlight discord channel for issues with MobiFlight. You will also find a lot of information on using arduinos over at https://www.cockpitbuilders.com/ John Link to comment Share on other sites More sharing options...
MD80PROJECT Posted July 12, 2022 Author Report Share Posted July 12, 2022 On 8/7/2022 at 12:39, John Dowson said: Muéstrame/adjunta tus archivos DSUIPC6.ini y FSUIPC6.log. Pruebe el canal de discordia de MobiFlight para problemas con MobiFlight. También encontrará mucha información sobre el uso de arduinos en https://www.cockpitbuilders.com/ John I have a problem, I don't know what you mean by my DSUIPC6.ini and FSUIPC6.log files. I only know the file FSUIPC6.ini ( format .ini ) Attached are the two files I am working with. I also need to attach screenshots and expose them in this forum so that you can see it but I am not able to do it, that would make things much easier for a correct understanding Thank you so much John 😉 regards master_caut.lua.txt FSUIPC6.ini Link to comment Share on other sites More sharing options...
John Dowson Posted July 12, 2022 Report Share Posted July 12, 2022 52 minutes ago, MD80PROJECT said: I have a problem, I don't know what you mean by my DSUIPC6.ini and FSUIPC6.log files. I only know the file FSUIPC6.ini ( format .ini ) Yes - the 'D' was a typo. There should also be a .log file in the same folder - if you cannot see it, change your Explorer settings to show the extensions of known file types. Your ini file shows that you only have one lua file: Quote [LuaFiles] 1=MADDOG_X.lua There is no master_caut.lua file - you have called it master_caut.lua.txt (as the file you attached in your last comment). So your issue is that you are using the wrong file type, most probably due to your Explorer settings - change those so that you can see the actual extension type. John Link to comment Share on other sites More sharing options...
MD80PROJECT Posted July 28, 2022 Author Report Share Posted July 28, 2022 good news I have been successful, thanks to you, you have given me the necessary clues to put everything in order. i got it to work. I am very happy, because I have been wanting to understand how all this works for years and I have already found a part of the solution for the LED Indicator output. make sure that FSUIPC6.ini is edited with [Auto] and [LuaFiles] and make sure the Lua files are in that format. for example to make LED INDICATOR MASTER WARNING, I have made the following lua file ..... function CM1_masterwarn_adv1 (varname, value) ipc.writeUD(0x6748, value) end event.Lvar("L:CM1_masterwarn_adv1", 100, "master_warn") and then configure in mobiflight the output by the pin for the connection of the LED I am enormously grateful JOHN Thank you so much John 😉 regards Link to comment Share on other sites More sharing options...
John Dowson Posted July 29, 2022 Report Share Posted July 29, 2022 Thanks for reporting back and glad you got it working. One thing - be careful of the offset(s) that you are using. 0x6748 is in the range 0x6700 - 6D5F which is documented as Reserved. 0x6700 - 67FF is reserved for Jean-Michael Biston's Airbus gauges. You should be ok if you don't use those, but it is generally better to choose an offset that is in an area that is documented as 'Free for general use'. Regards, John Link to comment Share on other sites More sharing options...
MD80PROJECT Posted August 2, 2022 Author Report Share Posted August 2, 2022 On 7/29/2022 at 10:57 AM, John Dowson said: Gracias por informar y me alegro de que lo hayas hecho funcionar. Una cosa: tenga cuidado con las compensaciones que está utilizando. 0x6748 está en el rango 0x6700-6D5F que está documentado como Reservado . 0x6700 - 67FF está reservado para los calibres de Airbus de Jean-Michael Biston. Debería estar bien si no los usa, pero generalmente es mejor elegir un desplazamiento que esté en un área que esté documentada como ' Gratis para uso general '. Saludos, John Hi John. I'm too new to this offset, could you explain a little better what you mean by ( Reserved. 0x6700 - 67FF is reserved for Jean-Michael Biston's) has some kind of restriction on use by copyright or something like that. Sorry for my ignorance. And is there any other way to modify the free scroll? Also at the moment I am trying to use a script crawler to find out what all the MADDOG X Lvars are and where their corresponding offsets are. I want to use LINDA TRACER but I have had an error that I don't know why. I don't know if this information is published by the manufacturer of maddog x or I have to find out on my own, or if there is someone who has already found out. I'm trying to figure out what the LVARs are for the warning messages on the displays. From the annunciator panel. I have found out the Lvar and the offsets that I have in the green box. But the Lvar and the offset of the messages in amber letters surrounded by the red box I don't know what they are and how I can find them. Thank you very much and happy day. Regards. Link to comment Share on other sites More sharing options...
John Dowson Posted August 3, 2022 Report Share Posted August 3, 2022 16 hours ago, MD80PROJECT said: I'm too new to this offset, could you explain a little better what you mean by ( Reserved. 0x6700 - 67FF is reserved for Jean-Michael Biston's) has some kind of restriction on use by copyright or something like that. Sorry for my ignorance. Take a look at the offset documentation - this tells you what each offset area is used for. If you want to use offsets for your own purpose, then you should choose an offset in an area that is designated as free for general use. 16 hours ago, MD80PROJECT said: And is there any other way to modify the free scroll? Of course - just change the script. However, it is fine to used offsets reserved for another application if you are not using that application, so you can just leave it as it is. 16 hours ago, MD80PROJECT said: Also at the moment I am trying to use a script crawler to find out what all the MADDOG X Lvars are and where their corresponding offsets are. Lvar values are not held in offsets, but you can add them to an offset (one that is free for general use!) using lua if you so wish. Yo see what lvats are available, you can use the FSUIPC-added control List local panel variables. Just assign a button or keypress to that control and when you press the assigned button/key the available lvars will be listed in the FSUIPC6.log file. 16 hours ago, MD80PROJECT said: I want to use LINDA TRACER but I have had an error that I don't know why. I can't help with Linda - try the Linda support forum: https://www.avsim.com/forums/forum/429-linda-support/?ct=1659519971 16 hours ago, MD80PROJECT said: But the Lvar and the offset of the messages in amber letters surrounded by the red box I don't know what they are and how I can find them. They look to be messages generated from the state of simvars (or possible lvars). For example, Parking Brakes On will be displayed when the BRAKE PARKING POSITION simvar, held in offset 0x0BC8, has a value of 32767. If the value is 0, it would display Parking Brakes Off. I doubt that there is anything that actually holds the messages themselves. John Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now