samsee23 Posted May 24, 2021 Report Posted May 24, 2021 Can anyone point me in the right direction for this. i have a rotary encoder that I want to set to altitude increase/decrease and a two position switch that I want to set to 100/1000 for the increments like in the a320. I have found the control to increase the alt but it is either 1000 increments or 100. Is there a way to replicate the behaviour of the actual dial. Or is mouse macros working so I can record the mouse click? many thanks. sam
John Dowson Posted May 25, 2021 Report Posted May 25, 2021 On 5/24/2021 at 7:36 PM, samsee23 said: i have a rotary encoder that I want to set to altitude increase/decrease and a two position switch that I want to set to 100/1000 for the increments like in the a320. I have found the control to increase the alt but it is either 1000 increments or 100. Expand But don't the controls do what you want - i.e. either increment by 100 or 1000, as you want? If you want different sized increments, you could use one of the Offset <size> Increment/Decrement controls (where <size> is the size of the offset, probably a dword). Maybe try with offset 0x07D4 (Autopilot Altitude Lock Var). In the A320, you may have to switch between managed and selected modes (using the ALTITUDE_SLOT_INDEX_SET control). There may be more info on this on the Asobo forums, e.g. https://forums.flightsimulator.com/t/a320-fcu-variable-autopilot-altitude-lock-var-vs-displayed-altitude/307093/7 John
samsee23 Posted May 25, 2021 Author Report Posted May 25, 2021 On 5/25/2021 at 10:06 AM, John Dowson said: But don't the controls do what you want - i.e. either increment by 100 or 1000, as you want? If you want different sized increments, you could use one of the Offset <size> Increment/Decrement controls (where <size> is the size of the offset, probably a dword). Maybe try with offset 0x07D4 (Autopilot Altitude Lock Var). In the A320, you may have to switch between managed and selected modes (using the ALTITUDE_SLOT_INDEX_SET control). There may be more info on this on the Asobo forums, e.g. https://forums.flightsimulator.com/t/a320-fcu-variable-autopilot-altitude-lock-var-vs-displayed-altitude/307093/7 John Expand I have found the Lvars for the increments switch now that i want to change. Where do I store my macros files for MSFS2020?
John Dowson Posted May 25, 2021 Report Posted May 25, 2021 On 5/25/2021 at 10:26 AM, samsee23 said: I have found the Lvars for the increments switch now that i want to change. Where do I store my macros files for MSFS2020? Expand The same location as in all versions of FSUIPC - in the FSUIPC installation folder. If you don't know where that is, use the File -> Open Installation Folder... menu option. If using lvars, you may want to look into using the latest FSUIPC7 beta (if not already) that allows you to add lvars to free user offsets for reading and writing. See the Announcements section for details and to download. John
samsee23 Posted May 25, 2021 Author Report Posted May 25, 2021 On 5/25/2021 at 10:32 AM, John Dowson said: The same location as in all versions of FSUIPC - in the FSUIPC installation folder. If you don't know where that is, use the File -> Open Installation Folder... menu option. If using lvars, you may want to look into using the latest FSUIPC7 beta (if not already) that allows you to add lvars to free user offsets for reading and writing. See the Announcements section for details and to download. John Expand I have put it in that folder and have the latest beta but cant see it in the dropdown
John Dowson Posted May 25, 2021 Report Posted May 25, 2021 On 5/25/2021 at 10:37 AM, samsee23 said: I have put it in that folder and have the latest beta but cant see it in the dropdown Expand Was FSUIPC already running when you did this? If so, try either restarting it or 'Reload' your assignments. If its still not there, check the extension is. .mcro - if its not, it won't be recognised. You can take a look at your FSUIPC7.ini file, in the [MacroFiles] section, to see if your file is listed - if not, it is not named correctly or is in the wrong location.
samsee23 Posted May 25, 2021 Author Report Posted May 25, 2021 sorry to be a pain i have got it to show now turns out i has . instead of : i am trying to get the macro to do this: [Macros] 1=L:XMLVAR_Autopilot_Altitude_Increment=1000 when I use the lvars set in fsuipc it works but running this macro does not. any ideas?
John Dowson Posted May 25, 2021 Report Posted May 25, 2021 On 5/25/2021 at 10:54 AM, samsee23 said: i am trying to get the macro to do this: [Macros] 1=L:XMLVAR_Autopilot_Altitude_Increment=1000 when I use the lvars set in fsuipc it works but running this macro does not. any ideas? Expand Please read the provided manual/instructions. The format of yout macro is wrong. It should be: [Macros] 1=L:XMLVAR_Autopilot_Altitude_Increment=Set,1000 Or, better, just: [Macros] 1=L:XMLVAR_Autopilot_Altitude_Increment=Set And then provide the parameter (1000) as the parameter to your assignment. In this way, you can assign it to one button with a parameter of 1000, and another with a parameter of 100.
samsee23 Posted May 25, 2021 Author Report Posted May 25, 2021 On 5/25/2021 at 11:30 AM, John Dowson said: Please read the provided manual/instructions. The format of yout macro is wrong. It should be: [Macros] 1=L:XMLVAR_Autopilot_Altitude_Increment=Set,1000 Or, better, just: [Macros] 1=L:XMLVAR_Autopilot_Altitude_Increment=Set And then provide the parameter (1000) as the parameter to your assignment. In this way, you can assign it to one button with a parameter of 1000, and another with a parameter of 100. Expand i tried both of those methods but neither of them trigger the switch movement. im guessing it cant be done through a macro
John Dowson Posted May 25, 2021 Report Posted May 25, 2021 On 5/25/2021 at 11:34 AM, samsee23 said: i tried both of those methods but neither of them trigger the switch movement. im guessing it cant be done through a macro Expand If changing the lvar doesn't change the switch, then no, you can't do it this way. You should try setting lvars manually (using the Add-ons->WASM->Set Lvar... menu entry) to see if they work before attempting to use them. You should try using the standard controls. Please see my previous comments and the link provided.
samsee23 Posted May 25, 2021 Author Report Posted May 25, 2021 On 5/25/2021 at 11:38 AM, John Dowson said: If changing the lvar doesn't change the switch, then no, you can't do it this way. You should try setting lvars manually (using the Add-ons->WASM->Set Lvar... menu entry) to see if they work before attempting to use them. You should try using the standard controls. Please see my previous comments and the link provided. Expand it does work using set lvar menu which is strange that it doesnt work through macros
John Dowson Posted May 25, 2021 Report Posted May 25, 2021 On 5/25/2021 at 11:44 AM, samsee23 said: it does work using set lvar menu which is strange that it doesnt work through macros Expand If it works through the lvar menu, it should work using macros. Please activate debug logging for the WAPI and WASM, change the value using the lvar menu, then try changing using your assigned button or key. Then show me your FSUIPC7.log and FSUIPC_WASM.log files, together with your FSUIPC7.ini and macro file. Alternatively, if not using the latest FSUIPC7 beta (see Announcements section), you could try that and add the lvar to a free user offset, and assign your button to an Offset * Set control .
samsee23 Posted May 25, 2021 Author Report Posted May 25, 2021 On 5/25/2021 at 11:49 AM, John Dowson said: activate debug logging for the WAPI and WASM Expand how do i do this?
John Dowson Posted May 25, 2021 Report Posted May 25, 2021 On 5/25/2021 at 11:52 AM, samsee23 said: how do i do this? Expand You could try reading the WASM section in the Advanced User Guide... You need to set the LogLevel ini parameter to Debug in both your FSUIPC7.ini file (in [WAPI] section) and in your FSUIPC_WASM.ini file ([General] section).
samsee23 Posted May 25, 2021 Author Report Posted May 25, 2021 On 5/25/2021 at 11:56 AM, John Dowson said: You could try reading the WASM section in the Advanced User Guide... You need to set the LogLevel ini parameter to Debug in both your FSUIPC7.ini file (in [WAPI] section) and in your FSUIPC_WASM.ini file ([General] section). Expand Thans for your help on this... i have restarted the pc and tried it again. it all now seems to me working . thanks again for the help
John Dowson Posted May 25, 2021 Report Posted May 25, 2021 On 5/25/2021 at 12:15 PM, samsee23 said: i have restarted the pc and tried it again. it all now seems to me working . thanks again for the help Expand Ok, but strange, Maybe you just needed to restart FSUIPC, or reload yout assignments if manually changing your files while FSUIPC is running.
samsee23 Posted May 25, 2021 Author Report Posted May 25, 2021 On 5/25/2021 at 12:39 PM, John Dowson said: Ok, but strange, Maybe you just needed to restart FSUIPC, or reload yout assignments if manually changing your files while FSUIPC is running. Expand maybe yeah. Need to get the alt knob to work now. i can make it go up in 100ft increments regardless of what the increments setting is set to. Is it possible to use that lvars number to be a multiplier.
John Dowson Posted May 25, 2021 Report Posted May 25, 2021 On 5/25/2021 at 12:44 PM, samsee23 said: i can make it go up in 100ft increments regardless of what the increments setting is set to. Expand And what happens if you try to increment with a different value using the Set Lvar... menu option? If you can set there, it should be the same via assignments and you are doing something wrong. Again, logging would help. And are you using the FBW mod or the stock A320? If the stick one, you should try the FBW mod instead. On 5/25/2021 at 12:44 PM, samsee23 said: Is it possible to use that lvars number to be a multiplier. Expand What does this mean? If you want to change the value based on the existing value, you would need to read the value first, apply whatever multiplier (ot function) you require, and then write the value back. If you want to do this, you would have to use a lua script.
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