JaceR69 Posted January 3, 2022 Report Posted January 3, 2022 Hi, my name its Borja, I just bought FSUIPC7 to set the Lvars from A320 FBW https://docs.flybywiresim.com/pilots-corner/a32nx-briefing/a32nx_api/ but i dont know how to start to do it. Im looking for set the APU MASTER sw and the START sw that its not avaible on the MSFS controls menu. this its another post from FBW https://docs.flybywiresim.com/fbw-a32nx/a32nx-api/
John Dowson Posted January 4, 2022 Report Posted January 4, 2022 16 hours ago, JaceR69 said: I just bought FSUIPC7 to set the Lvars You should have tried FSUIPC7 with the trial license before purchasing... 16 hours ago, JaceR69 said: i dont know how to start to do it To use lvars, you need to either - add the lvar to a free FSUIPC offset, and then assign using one of the offset controls - use a macro file - use a lua script Please see the provided documentation. If you are new to FSUIPC, you should at least take a look at the User guide. Access to lvars/hvars/calculator code is provided by the FSUIPC WASM module. Please see the Advanced User guide, starting on page 43. For macro use, see P33 for general macro information, and P35 on how to access lvars using macros, also in the Advanced User Guide. John
JaceR69 Posted January 5, 2022 Author Report Posted January 5, 2022 Okey, I was testing the info in the PDF's and I can set this on "1A320.mcro" file located in FSUIPC7 main folder: 1=MAP Capt=C2999,1 2=NAV Capt=C2999,2 3=VOR Capt=C2999,3 4=PLN Capt=C2999,4 5=APP Capt=C2999,5 6=CTR Capt=C2999,6 101=MAP F/O=C2999,101 when i go to buttons and switch assignaments i can see this lvar on the dropdown menu, BUT if i try to set the Lvars that I want; the A320 of FBW (https://docs.flybywiresim.com/pilots-corner/a32nx-briefing/a32nx_api/), I cant see them. The first step that I do its go to Addons > WASM > List Lvar After that a long list its deployed and I select "A32NX_OVHD_APU_MASTER_SW_PB_IS_ON" that in my opinion its for the master button to start the apu I go to the 1A320.mrco file and set as: 1=A32NX_OVHD_APU_MASTER_SW_PB_IS_ON=66C0 i save it, i go to the drop list on FSUIPC PROGRAM and it doesnt show the control. IF I change the offset, for example from 66C0 to C2999,1 (as the explame states on the "advanced user pdf" the control appears on the drop list on the FSUIPC program but doesnt do anything on the game Regards, Borja
John Dowson Posted January 5, 2022 Report Posted January 5, 2022 14 minutes ago, JaceR69 said: 1=MAP Capt=C2999,1 2=NAV Capt=C2999,2 3=VOR Capt=C2999,3 4=PLN Capt=C2999,4 5=APP Capt=C2999,5 6=CTR Capt=C2999,6 101=MAP F/O=C2999,101 when i go to buttons and switch assignaments i can see this lvar on the dropdown menu, BUT if i try to set the Lvars that I want They are not lvars. You have created macros that send the control '2999'. Did you read the manual? This is the relevant section: Quote The macro facility to operate Lvars can only be used by editing macro files and building them manually. The format is: N=L:name=ACTION Where ACTION must be one of: Set, Inc, Dec, Sbits, Cbits, Cyclic or Toggle (but only the first 3 letters are needed): Set copies the parameter in the Macro invocation to the identified Lvar. Alternatively, a value can be given explicitly here, by “Set,n”. Values are limited to the normal parameter range, –32768 to 32767 ... 23 minutes ago, JaceR69 said: I go to the 1A320.mrco file and set as: 1=A32NX_OVHD_APU_MASTER_SW_PB_IS_ON=66C0 Why do you think that would work? PLEASE read the documentation. To toggle (i.e. change from 1->0 or 0->1), ytu: 1=L:A32NX_OVHD_APU_MASTER_SW_PB_IS_ON=Toggle 26 minutes ago, JaceR69 said: IF I change the offset, for example from 66C0 to C2999,1 (as the explame states on the "advanced user pdf" the control appears on the drop list on the FSUIPC program but doesnt do anything on the game I don't know where you are seeing this. You are confusing offsets with controls. If you want to add the lvar to an offset, then that is a different way to access lvars which is also explained, with an example, in the Advanced User guide. John
wk2022 Posted January 5, 2022 Report Posted January 5, 2022 Hi John, i also have problems to understand how to change the value of a lvar in a simple way and how to make the connection to "control sent when button pressed", because lvars are not listed in this drop down list, just custom events, macros. Where to define this example above to change the lvar value: 1=L:A32NX_OVHD_APU_MASTER_SW_PB_IS_ON=Toggle ? in the marco file? In: "N=L:name=ACTION" what does N mean? The index as a reference to a defined macro? Thank you for your help. Werner
JaceR69 Posted January 5, 2022 Author Report Posted January 5, 2022 2 hours ago, John Dowson said: They are not lvars. You have created macros that send the control '2999'. Did you read the manual? This is the relevant section: okey this understood 2 hours ago, John Dowson said: Why do you think that would work? PLEASE read the documentation. To toggle (i.e. change from 1->0 or 0->1), ytu: 1=L:A32NX_OVHD_APU_MASTER_SW_PB_IS_ON=Toggle well, im not an expert in this and my english its not my mother lenguage, so maybe i missunderstood something when I read the "advanced user PDF" and "user guide". I have doubts about if the files are set on the correct place. 12 minutes ago, wk2022 said: Hi John, i also have problems to understand how to change the value of a lvar in a simple way and how to make the connection to "control sent when button pressed", because lvars are not listed in this drop down list, just custom events, macros. Where to define this example above to change the lvar value: 1=L:A32NX_OVHD_APU_MASTER_SW_PB_IS_ON=Toggle ? in the marco file? As John say i have the same problems, maybe we are not enought expert as we have to, to understand all this info, maybe if the guide has a "tutorial" with photos or something like this video "https://www.youtube.com/watch?v=PKBjEl9E5A4&t=877s&ab_channel=MobiFlight" but in a photo way or more detailed like i explained here "I can set this on "1A320.mcro" file located in FSUIPC7 main folder.... The first step that I do its go to Addons > WASM > List Lvar. After that a long list its deployed and I select "A32NX_OVHD_APU_MASTER_SW_PB_IS_ON" that in my opinion its for the master button to start the apu. I go to the 1A320.mrco file and set as: 1=A32NX_OVHD_APU_MASTER_SW_PB_IS_ON=66C0 I save it, i go to the drop list on FSUIPC PROGRAM" to that users that are not so adavanced but want to start to explore this world. Kind regards and thanks Jhon for help us ❤️ Borja.
John Dowson Posted January 6, 2022 Report Posted January 6, 2022 14 hours ago, wk2022 said: i also have problems to understand how to change the value of a lvar in a simple way and how to make the connection to "control sent when button pressed", The easiest way to do this is to use the Adding Lvars to Offsets functionality, which may be easier to understand. A full example is given on how to do this in the Advanced User guide, P43. Can you please read the whole section on using the FSUIPC WASM module to get a basic understanding on how to use lvars/hvars, then just try it out. There are also many support requests where I have explained things in more detail, so please check previous support cases if you have any issues, e.g. 14 hours ago, wk2022 said: in the marco file? In: "N=L:name=ACTION" what does N mean? The index as a reference to a defined macro? It is the index number for internal reference. 14 hours ago, wk2022 said: how to make the connection to "control sent when button pressed", because lvars are not listed in this drop down list, just custom events, macros. Where to define this example above to change the lvar value: 1=L:A32NX_OVHD_APU_MASTER_SW_PB_IS_ON=Toggle ? If using mactos, then assign to that macro - it will be listed as: YourMacroFilename: L:A32NX_OVHD_APU_MASTER_SW_PB_IS_ON Toggle 14 hours ago, JaceR69 said: As John say i have the same problems, maybe we are not enought expert as we have to, to understand all this info, maybe if the guide has a "tutorial" with photos or something like this video I just don't have time for this, but there is already an abundance of information on using FSUIPC macros - they have been around for many many years. If you find using macros complicated, just use the lvars-to-offfsets functionality instead. The example given in the Advanced user guide should be easy enough to follow. Just make sure that the offset control used matches the type of the value you are storing, don't overlap offsets, and make sure that they are boundary aligned (all explained in the Advanced User Guide). John
wk2022 Posted January 6, 2022 Report Posted January 6, 2022 Hi Borja, John is right, that everything is explained in the documents, but it is not so easy (at least for me) to get everything together. Now let me describe step-by-step how you can toggle the lvar: A32NX_OVHD_APU_MASTER_SW_PB_IS_ON You do not need a macro, just an offset. 1) Assign a free offset (A000) to your lvar in FSUIPC7.INI: [LvarOffsets] 1=L:A32NX_OVHD_APU_MASTER_SW_PB_IS_ON=UB0xA000 In: FSUIPC7 Offsets Status.pdf on page 106 it is described that the offsets from A000 to A200 are free for general use. Therefore lets use the first free offset (A000) Please do not forget to "Add-Ons->WASM->Reload" after you make changes in this section of the PSUIPC7.INI 2) In FSUIPC7 go to "Assignments->Buttons&Switches" and press your joystick button to assign to the APU Master Switch. Select the checkbox "Select for FS Control" From the drop-down list of "Control sent when button pressed" select "Offset Byte Togglebits" Enter in the field Offset: xA000, enter in the field parameter: x01 You see the connection between your button and the lvar is the offset A000 After pressing OK it should work (i just tested it) Regards Werner
ON4KN Posted March 11, 2022 Report Posted March 11, 2022 Hi Werner, I just started to program buttons with FSUIPC. I have been reading and searching in forums and YT videos for already 3 days with no results. Your reply to Borja is the first real example that I have found so far and that I maybe can use to program BAT1 & BAT2 for the FBW A320 on my new Thrustmaster TCA. I really do understand that John can not make the code for everyone. Otherwise for non-English native language people, the manuals are not easy at all and to interpret. If I can code both BAT switches, I’ll try the 3 position landing lights but I’m afraid that it’s a no-go at all. Anyway I can continue after March 20th because I’ll be in Austria. Thank you very much for your step_by_step description. Peter
John Dowson Posted March 12, 2022 Report Posted March 12, 2022 @ON4KN I understand that setting up lvars to access via offsets can be quite confusing, especially for non-native English speakers. The latest version of FSUIPC (v7.3.1) supports the use of MobiFlight presets which should be easier to use. Check the MobiFlight hub-hob resource (https://hubhop.mobiflight.com/) for the aircraft you are using and search for a preset for the function you want to implement. So, for example, for the A320 BAT1 I see this preset: A32NX_OH_ELEC_BAT1_TOG. That will be listed under the controls menu as 'Preset: A32NX Oh Elec Ba1 Tog' (providing you have the WASM installed and enabled, and have also installed the MF preset file, called events.txt). You can assign your button directly to that preset. John
ON4KN Posted March 12, 2022 Report Posted March 12, 2022 Thank you very much, John ! I’ll try it when I’m back home from Austria next week.
ON4KN Posted April 1, 2022 Report Posted April 1, 2022 Hi John, Here are the results what I have done for the Bat1 & 2 switches on the FBW A320 (dev version). First I updated FSUIPC to version 7.3.2 and I brought back the ini file to default. I selected Assignments/Buttons & Switches, pushed the button on the TQ, Select for FS control, selected “Preset:OVHD ELEC BATTERY 1 TOGGLE” in the pulldown menu, parameter set to 1. It works from the first time. I did the same for Bat2 and bingo ! Both switches are doing the job. To be sure I did it also for external power and this works great too. It was much more easier than I thought and tried before. Thanks for your support and best regards, Peter
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