=36=Witcher Posted April 3, 2021 Share Posted April 3, 2021 (edited) It seems that the "FBW G-Limiter AA else CHARGES" does not work as expected. As I read it, it should go AA as long as the key is pressed, and CHARGES if released, and this actually works for a long-press of the key. Instead, when I just press the key and release it immediately, it acts like a toggle. I expect it to do a quick AA/CHARGES cycle and stay down instead. Edited April 3, 2021 by =36=Witcher Link to comment Share on other sites More sharing options...
Steph21 Posted April 3, 2021 Share Posted April 3, 2021 (edited) This kind of bind is normally used for 2 position switch and allow to mimic the real switch on the aircraft. So it works as expected. There's another bind that is doing what you want and that I'm currently using. Should be used with push button.I'll get you the name. Edited April 3, 2021 by Steph21 Link to comment Share on other sites More sharing options...
=36=Witcher Posted April 3, 2021 Author Share Posted April 3, 2021 (edited) Thanks for your reply, but I'm afraid this is not what I'm talking about. You see, all this comes from the fact that through Thrustmaster TARGET I'm "simulating" a two way-switch: if I quick press a button on a Thrustmaster MFD I quicly send 1 and then 0 (to "reset" the switch, because it seems that the 0 is not registered if I enter the cockpit in AA position until I send 1 at least once), if I long press it I send 1. So I expect that when I send a 1 and immediately after that a 0 (which mimics a physical switch up/down), the switch should stay CHARGES in the end, not toggling every time. Edited April 3, 2021 by =36=Witcher Link to comment Share on other sites More sharing options...
Steph21 Posted April 3, 2021 Share Posted April 3, 2021 Ok so that might be linked to Target. I stopped using it a while ago. Anyway, here is the bind for FBW Limiter toggle: "FBW G-Limiter Mode TOGGLE". Just map it to your OSB on the Thrusmaster MFD, and you will be fine. Link to comment Share on other sites More sharing options...
=36=Witcher Posted April 3, 2021 Author Share Posted April 3, 2021 Yeah, but this way I will have a toggle, which is not what I would like to. Of course I will resort to it if I should find any other solution... that could be to add a small delay between press and delay. Thanks for the inputs, it's been a constructive discussion Link to comment Share on other sites More sharing options...
=36=Witcher Posted April 3, 2021 Author Share Posted April 3, 2021 (edited) Ok, the more I play with it, the more I realize that probably the better thing would be to introduce "single state" alternative bindings. In other words, now we have "FBW G-Limiter Toggle" and "FBW AA else CHARGES". Well, in order to accomplish what I want, the cleaner way would be to also have "FBW AA" and "FBW CHARGES". By the way, it seems that other switches already have those (e.g. Master Arm, TDC Mode) while others don't (e.g. FBW Charges, Gun Arm, Radar B-Scope). Is there a chance we could get these bindings in the future? Edited April 3, 2021 by =36=Witcher Link to comment Share on other sites More sharing options...
Kercheiz Posted April 4, 2021 Share Posted April 4, 2021 If you look at the default.lua bind file, this bind is doing nothing else than moving the cockpit switch, to AA when the device sends a 1, to CHARGES when the device sends a 0. If you think you are sending quickly a 1 then a 0, and it doesn’t end up at CHARGES, that’s either because you are not sending what you think with TARGET, or because DCS or DirectX mess up the events, by filtering out the 0 or swapping them because they are simultaneous. You should check with a joystick event logging tool what TARGET is really sending. Link to comment Share on other sites More sharing options...
Frederf Posted April 30, 2021 Share Posted April 30, 2021 The reason for this is that the "up" action isn't recognized while the switch is animating from 0 to 1. During the animation sequence it's not possible to command the other direction. The motion up to the charges position continues despite the "up" command sending it back down. It's not yet in the charges position. There's nothing wrong with his input it's just changing your mind like that isn't supported. There are switches in DCS which are interruptible despite being mid-transition, but I don't know how that's done. The quickest solution I can guess is to make a custom command for switch state 0 and 1 and bind them explicitly to separate button inputs. I think that will allow explicit mid-transition switch state commands to go through instead of being ignored. Link to comment Share on other sites More sharing options...
Svend_Dellepude Posted April 30, 2021 Share Posted April 30, 2021 What you could do is map the up action to the release of the button with a delay, ie. mapkey( xxx, DOWN+ DXxx) mapkeyR( xxx, CHAIN( 0, D(500), UP+ DXxx) [sIGPIC][/sIGPIC] Win10 64, Asus Maximus VIII Formula, i5 6600K, Geforce 980 GTX Ti, 32 GB Ram, Samsung EVO SSD. Link to comment Share on other sites More sharing options...
Frederf Posted April 30, 2021 Share Posted April 30, 2021 As a semi-whiz in TARGET I'm trying to conceive of a solution that allows the "off" command instantly except in cases where on hasn't been on long enough. I'm also a bit curious if this applies in the reverse, the on command not being recognized if the switch is in transition from on to off. include "target.tmh" char onLongEnough; //tracking if switch on long enough to turn off int chainedFunction; //function run on 1 int delayedRelease; //function if quick release int main() { if(Init(&EventHandle)) return 1; onLongEnough = 0; //initialize false chainedFunction = CHAIN(DOWN+DX1, D(1000), EXEC("onLongEnough=1;")); delayedRelease = CHAIN(D(1000), EXEC("if(Throttle[EACOFF]) ActKey(KEYON+UP+DX1);")); MapKey(&Throttle, EACON, EXEC("ActKey(PULSE+KEYON+chainedFunction);")); MapKeyR(&Throttle, EACON, EXEC("if(onLongEnough==1) ActKey(KEYON+UP+DX1); else ActKey(KEYON+PULSE+delayedRelease); onLongEnough=0;")); } int EventHandle(int type, alias o, int x) { DefaultMapping(&o, x); } Best I can do. If you rapidly flip the switch on/off it gets confused because there is no lock on the delayed actions and they overlap. I could introduce a lock but that would mean more problems I think. Simply changing the switch again calmly resyncs it though. Link to comment Share on other sites More sharing options...
Svend_Dellepude Posted May 3, 2021 Share Posted May 3, 2021 (edited) Not sure what you are trying to do, but you should probably chance this: chainedFunction = CHAIN(DOWN+DX1, D(1000), EXEC("onLongEnough=1;")); To this: chainedFunction = CHAIN(DOWN+DX1, TEMPO(0, EXEC("onLongEnough=1;"), 1000)); Since that will prevent the flag from turning on if the button is not held for a full second. With a DELAY the flag will turn on after one second regardless. Edited May 4, 2021 by Svend_Dellepude [sIGPIC][/sIGPIC] Win10 64, Asus Maximus VIII Formula, i5 6600K, Geforce 980 GTX Ti, 32 GB Ram, Samsung EVO SSD. Link to comment Share on other sites More sharing options...
Frederf Posted May 4, 2021 Share Posted May 4, 2021 Ah, clever, I like it. Link to comment Share on other sites More sharing options...
=36=Witcher Posted May 12, 2021 Author Share Posted May 12, 2021 Il 4/4/2021 at 19:09, Kercheiz ha scritto: If you look at the default.lua bind file, this bind is doing nothing else than moving the cockpit switch, to AA when the device sends a 1, to CHARGES when the device sends a 0. If you think you are sending quickly a 1 then a 0, and it doesn’t end up at CHARGES, that’s either because you are not sending what you think with TARGET, or because DCS or DirectX mess up the events, by filtering out the 0 or swapping them because they are simultaneous. You should check with a joystick event logging tool what TARGET is really sending. Hey, sorry I didn't reply to this... I must have missed the notification. I already checked with the Thrustmaster Device Analyzer. I am definitely sending the 1 and the 0, the issue is with the timing because if I add a pause of, let's say, 200ms it works. So it should be as @Frederfsaid: as long as the switch is animating it will reject the next input. But honestly, to me sending a 1 and then a 0 looks like an hack. Of course, if it's my only option I guess I'll have to live with it, no problem Link to comment Share on other sites More sharing options...
Kercheiz Posted May 21, 2021 Share Posted May 21, 2021 Seems the animation speed was increased in latest release, which kinda solves the issue (at the expense of style as animations are much faster) Link to comment Share on other sites More sharing options...
Steph21 Posted May 21, 2021 Share Posted May 21, 2021 (edited) Thanks Witcher, i hope you will hear all of our screams when you'll push your damn OSB button in the future and that it will haunt you Edited May 21, 2021 by Steph21 Link to comment Share on other sites More sharing options...
=36=Witcher Posted May 21, 2021 Author Share Posted May 21, 2021 (edited) They probably will. But let me point out that I had a different solution in my mind: Il 3/4/2021 at 12:01, =36=Witcher ha scritto: Ok, the more I play with it, the more I realize that probably the better thing would be to introduce "single state" alternative bindings. In other words, now we have "FBW G-Limiter Toggle" and "FBW AA else CHARGES". Well, in order to accomplish what I want, the cleaner way would be to also have "FBW AA" and "FBW CHARGES". By the way, it seems that other switches already have those (e.g. Master Arm, TDC Mode) while others don't (e.g. FBW Charges, Gun Arm, Radar B-Scope). Is there a chance we could get these bindings in the future? So... I'm sorry anyway. Edited May 21, 2021 by =36=Witcher Link to comment Share on other sites More sharing options...
myHelljumper Posted June 23, 2021 Share Posted June 23, 2021 Hello guys. We talked with ED on this issue and we found the solution. Unfortunately it's a bit of work to implement so we are not going to fix this now as there are more important issues. Thanks. Helljumper - M2000C Guru Helljumper's Youtube https://www.youtube.com/channel/UCK3rTjezLUxPbWHvJJ3W2fA Link to comment Share on other sites More sharing options...
Recommended Posts