Charles Abela Posted October 20, 2017 Report Posted October 20, 2017 Tried for long time but no luck. Need help with a line of code to reset a flag on the X52 PRO PINKIE BUTTON to Off. Background. X52 Pro. Running VRS Superbug/Tacpack. Button “C” on the stick. It moves the TDC to the left DDI. Uncages. It sets the target. It designates. All works fine. (See Lines 39 40 41) If I want to un-designate immediately or at a later stage, I want to use the same button, “C”, first by pressing the PINKIE, then Button “C” again. (see Line 42) Works fine up to here. But I want to reset the Flag to be able to go to the target designations again if I need to without remembering to reset the Flag to “Clear” OFF by pressing the PINKIE. This instruction does not work!!!!!! I have one joystick which is “0”. 256 * 0 + 5 = 5. ?? 99=;#Code BELOW: TDC to RDDI, Uncage, Designate and Undesignate 39=P0,4,K39,10 -{Key press: ctl+Right}- 40=P0,4,K85,10 ; Uncage -{Key press: ctl+U}- 41=P0,4,K13,8 -{Key press: Rtn}- 42=CP(F+0,5)0,4,K46,9 ; Un-Designate -{Key press: shft+Del}- 43=P0,5,C1004,5 ; Set Flag to OFF ????????????????????????????????????? 99=; Thank you Charles Abela ------------------------ SPECS: Win 7 Premium - 64 BIT, Intel i7 5820, 16G Ram, NVIDIA GTX 970, Monitor 1920 x 1080 x 16. VRS Superbug 1.4.3.4 + Tacpack. EZDOK. FSUIPC4 1.4.3.4 Paid Version. X52 PRO. FSX Acceleration.
Pete Dowson Posted October 21, 2017 Report Posted October 21, 2017 10 hours ago, Charles Abela said: Button “C” on the stick. It moves the TDC to the left DDI. Uncages. It sets the target. It designates. All works fine. (See Lines 39 40 41) If I want to un-designate immediately or at a later stage, I want to use the same button, “C”, first by pressing the PINKIE, then Button “C” again. (see Line 42) Works fine up to here. But I want to reset the Flag to be able to go to the target designations again if I need to without remembering to reset the Flag to “Clear” OFF by pressing the PINKIE. This instruction does not work!!!!!! I have one joystick which is “0”. 256 * 0 + 5 = 5. ?? You only have two lines related to the flag: 42=CP(F+0,5)0,4,K46,9 ; Un-Designate -{Key press: shft+Del}-43=P0,5,C1004,5 ; Set Flag to OFF ????????????????????????????????????? The first one tests the flag, and if set it sends a Shift+Del.The second tries to toggle the flag and clear it at the same time! Without checking the code I am not sure which will come first, but I think it is likely to clear it then toggle it (so turn it back on!). However, it is an odd thing to try to do, and the results muct be considered indeterminate. Oddly I see no line where you specifically SET the flag in the first place,! And I think you missed or didn't understand this line in the description of flags in the Advanced Users guide: Each time any button is pressed (goes from off to on) FSUIPC4 toggles its flag. Thismakes the buttons flag a sort of “latching” switch. If you want to use a button only for toggling a flag, just assign it to something which does nothing, e.g. keystroke K0,8. Or, more logically, use a flag which is not assocated at all with any device you have. As the manual says: For every possible “normal” button (16 joysticks x 32 buttons = 512 buttons)FSUIPC4 maintains a “Flag” (F). So there are always 512 flags and you can set, clear, toggle and test any one of them. However, I cannot support old versions of FSUIPC. If by " FSUIPC4 1.4.3.4" you do really mean 4.143d which is VERY VERY old, dating back many years), or in fact anything earlier than 4.971, the currently supported version, then please update before coming back! Pete
Charles Abela Posted October 21, 2017 Author Report Posted October 21, 2017 Hi Pete Thank you for your input. I will re-study the manual taking into consideration your suggestions. Regarding the version number, apologies, my mistake, I inserted the Superbug version by mistake. Charles Abela
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