Auto-blip when downshifting gears

Official forum for open source FreePIE discussion and development.
Post Reply
dusty.b
One Eyed Hopeful
Posts: 2
Joined: Sun Dec 21, 2014 11:47 pm

Auto-blip when downshifting gears

Post 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.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Auto-blip when downshifting gears

Post 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")
dusty.b
One Eyed Hopeful
Posts: 2
Joined: Sun Dec 21, 2014 11:47 pm

Re: Auto-blip when downshifting gears

Post 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?
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Auto-blip when downshifting gears

Post by CyberVillain »

Yes, look at the vjoy plugin
Post Reply

Return to “FreePIE”