Page 1 of 1

Auto-blip when downshifting gears

Posted: Mon Dec 22, 2014 12:07 am
by dusty.b
I'd like to write a script for auto-blipping the throttle on my pedals' throttle axis when downshifting gears on my h-pattern joystick. The pedals' throttle axis is a slider, I think, and the h-pattern gears are buttons. I'd like to blip the throttle only on downshifts, and setting a time variable for the slider value would be great (for example, instead of going from Slider = 0 to Slider = 10000 in one cycle, go from 0 to 10000 in x amount of time).

I know I can hammer this out in no time with a little direction, I'm just totally lost on the language. Cheers.

Re: Auto-blip when downshifting gears

Posted: Tue Dec 23, 2014 6:47 am
by CyberVillain
I dont understand exactly what you wanna do, but the only built in "timer" we got is the stop watch

Code: Select all

if filters.stopWatch(keyboard.getKeyDown(Key.A), 2000):
	diagnostics.debug("Test")

Re: Auto-blip when downshifting gears

Posted: Tue Dec 23, 2014 7:18 pm
by dusty.b
Well, the time variable may not be necessary. I'll see how the program responds without it.

The rest is straightforward. I have two joysticks on separate USB inputs. Joystick 1 has buttons and Joystick 2 has three axes (I only want to control one of the axes with FreePIE, which shows up as the RX axis in Windows). When I press a button on Joystick 1, I want FreePIE to engage a value on the RX axis on Joystick 2.

I'm assuming FreePIE can take direct control of the joystick, but maybe I need a virtual joystick?

Re: Auto-blip when downshifting gears

Posted: Sat Dec 27, 2014 8:53 am
by CyberVillain
Yes, look at the vjoy plugin