View Full Version : OK, where am I screwing up?
DDoutel
06-04-2004, 03:52 PM
I'm trying to get a simple Autorepeat going on the Pro Throttle USB B14 and B16 buttons (on the lower hatswitch) to use as prop pitch in IL2-FB; no matter how I structure this, all I ever get is a single keypress....
script
%define bAutoPitchÂ*Â*Â*Â*B1
if ( FIRSTSCAN ) then
Â*Â*Â*Â*bAutoPitch = FALSE;
endif
Sequence
Â*Â*Â*Â*// toggle the autopitch boolean on a press of the JS1.B4 button.
Â*Â*Â*Â*Wait( JS1.B4 );
Â*Â*Â*Â*bAutoPitch = NOT bAutoPitch;
EndSequence
if ( NOT bAutoPitch ) then
Â*Â*Â*Â*Sequence
Â*Â*Â*Â*Wait ( JS1.B16 );
Â*Â*Â*Â*CMS.B16 = TRUE;
Â*Â*Â*Â*Delay( 2 );
Â*Â*Â*Â*CMS.B16 = FALSE;
Â*Â*Â*Â*EndSequence
Â*Â*Â*Â*
Â*Â*Â*Â*Sequence
Â*Â*Â*Â*Wait ( JS1.B14 );
Â*Â*Â*Â*CMS.B14 = TRUE;
Â*Â*Â*Â*Delay( 2 );
Â*Â*Â*Â*CMS.B14 = FALSE;
Â*Â*Â*Â*EndSequence
Â*Â*Â*Â*
endif
endScript
Thanks in advance for looking at it!
Duane
MichaelCHProd
06-04-2004, 07:54 PM
Can't you just assign them in IL-2 as regular Direct X buttons and then hold them down when you want more than one button press?
DDoutel
06-04-2004, 08:15 PM
Originally posted by MichaelCHProd@Apr 6 2004, 02:54 PM
Can't you just assign them in IL-2 as regular Direct X buttons and then hold them down when you want more than one button press?
I ended up setting JS1.14 and JS1.16 as NON-DirectX mode, setting the CMS.14 and CMS.16 TO DirectX mode, and scripting them as follows:
Sequence
Â*Â*Â*Â*while ( JS1.B16 );
Â*Â*Â*Â*CMS.B16 = TRUE;
Â*Â*Â*Â*delay(2);
Â*Â*Â*Â*CMS.B16 = FALSE;
Â*Â*Â*Â*delay(2);
EndSequence
Â*Â*Â*Â*
Sequence
Â*Â*Â*Â*while ( JS1.B14 );
Â*Â*Â*Â*CMS.B14 = TRUE;
Â*Â*Â*Â*delay(2);
Â*Â*Â*Â*CMS.B14 = FALSE;
Â*Â*Â*Â*delay(2);
EndSequence
This works.
Another question I have, though; is it possible to specify a command line option to CMStart.exe for WHICH profile to use?
Thanks for the reply, Mike! BTW, I think it was you way back when that helped me out over on SimHQ with getting my Gameport Pro Pedals to work under XP.
Bob Church
06-04-2004, 11:43 PM
There's been a bug reported with the FirstScan flag not turning off when it should, I haven't gotten back to look into it yet, but that might have caused the problem. The other thing is that the second delay you added in the second example is probably necessary. Without that, it's probable that the Control Manager never saw the buttons open, they'd have been off and on again in a matter of microseconds without that trailing delay and wouldn't have stayed off long enough to register and let the key get seen as being up.
If FirstScan is broken it'll get fixed next go 'round, but you don't really need it there anyway. All of the bit variables are "OFF" when you first activate the map. It's only when they have to start "ON" that you need to force them.
Actually, it's probably easier to generate it with the INTERVAL timer:
script
timer( INTERVAL, d1, 2, 2 ) = js1.b16;
cms.b16 = d1;
timer( INTERVAL, d2, 2, 2 ) = js1.b14;
cms.b14 = d2;
endScript
The INTERVAL timer just turns off and on continuously while the input is TRUE and the "2, 2" sets off and on delay periods which avoids the problem without having to specifically set the trailing delay.
- Bob
The StickWorks
http://www.stickworks.com
MichaelCHProd
06-04-2004, 11:46 PM
Thanks Bob B)
DDoutel -
Sorry but there are no command line switches for the Control Manager. I will add it to the list of "it would be nice to have". For now the only thing you can do is use CHStart and hope the last map you downloaded is the one you want. B)
MichaelCHProd
06-04-2004, 11:47 PM
Or ClickStart ;)
DDoutel
07-04-2004, 02:24 AM
Thanks for the replies, guys! I pretty much got this beat, and you're right, Bob, I didn't need the FIRSTSCAN flag there.
Best Regards,
Duane
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.