FreePIE
FreePIE copied to clipboard
How i can get force feedback data
I want to take data to converting pwm arduino with freepie and vjoy
We never got forcefeedbackdata working with vjoy sadly. If someone wants to have a go at fixing this i gladly pull the code
We never got forcefeedbackdata working with vjoy sadly. If someone wants to have a go at fixing this i gladly pull the code
Did u try the new version of vjoy 2.2.1 njz3/vjoy or njz3/vJoyIOFeederWithFFB? I think they implement this Had to update Dll of new version of vjoy on freepie to get work
No, i haven't been active in freepie for a while now
No, i haven't been active in freepie for a while now
sad
It's not very hard to setup freepie with visual studio if you want to have a go at it. Basicly just load it up and hit f5
I worked on this terribly long ago, one of the FFB branches on my fork: https://github.com/MarijnS95/FreePIE/branches/yours
I didn't have FFB hardware back then so relied on others to try random builds which never worked out, but I'm pretty sure I managed to successfully test and get this working with minimal trivial changes when I eventually owned one. Probably never got to cleaning/pushing/PR'ing it.
I'll look around on my old harddisk and see what I can still find and push to that branch!
I worked on this terribly long ago, one of the FFB branches on my fork: https://github.com/MarijnS95/FreePIE/branches/yours
I didn't have FFB hardware back then so relied on others to try random builds which never worked out, but I'm pretty sure I managed to successfully test and get this working with minimal trivial changes when I eventually owned one. Probably never got to cleaning/pushing/PR'ing it.
I'll look around on my old harddisk and see what I can still find and push to that branch!
I think he wants to take the data and transform it out to his Arduino rather than a forcefeedback device if I'm not mistaken
Being a bit more clear (now that I remember again...), this is perhaps mostly irrelevant for you since extracting data from vJoy is only part of the problem: that branch also passes the data back into an XInput device (it was used back then to have multiple input devices, among which an FFB-driven wheel, feed a single unified vJoy device for games that didn't support this).
However, that branch should also contain some code/fixes to expose vJoy FFB data to Python, if it wasn't already there.
Also noticed just now that https://github.com/AndersMalmgren/FreePIE/commits/Ffb contains many such changes too.
Hey guys, i merged ftb into a new branch with current master. Was a few conflcits. I tested with a joystick and it can still read values off the plugin. didnt try vjoy since I dont have vjoy driver installed etc. Be ny guest to take it from there :D
https://github.com/AndersMalmgren/FreePIE/tree/ftb_merge_master
I tried above branch with this test software,.
https://www.fs-force.com/support.php#ForceTest
And that do triggers stuff in freepie
Doesnt matter though what I send, FreePIE reads it all as DeviceGain.
I don't have a joystick that supports force feedback xD Can I get force feedback data without supported device?
i saw a lot of DIY steering wheel, but depends on program like EMC utility lite or another pay program. I think with freepie can do better than
I don't have a joystick that supports force feedback xD Can I get force feedback data without supported device?
You need to forward the callback to python and handle the incoming stream of data yourself. The code in that branch only exposes a method to forward ffb to a ffb device. I would try with a real game and see what data it catches
You need to register to VJoyFfbWrap.OnFfbCallback
to start getting ffb data. Its exposed today only through vJoy[0].registerFfbDevice
which indeed requires a ffb device. But you can easy add yoru method to start getting all packets in the console.
public void RegisterFfbCallback(Action callback)
{
if (!FfbEnabled) throw new NotSupportedException("This VJoy device does not have FFB enabled");
VJoyFfbWrap.OnFfbCallback += (id, type, data) => callback();
}
public void registerFfbCallback(Action callback)
{
holder.RegisterFfbCallback(callback);
}
if starting:
vJoy[0].registerFfbCallback(lambda : diagnostics.debug("called"))
You should start seing data packets in the freepie console now.
@nosazik I have some update:
-
njz3/vJoyIOFeederWithFFB does not contain integration with DirectInput. It only forwards packets to PWM (Arduino / Teensy) providing support for Sega Model 3 and other arcade machines.
-
njz3/vjoy is recommended and provides some FFB fixes, be sure to update VJoyInterface.dll and VJoyInterfaceWrap.dll in your FreePIE directory
I made some progress with FFB and also have working SlimDX (Direct Input) implementation: https://github.com/AndersMalmgren/FreePIE/issues/48
I have further forked njz3/vjoy and provided a refactored API that is faster for C# (because of nested pointers used in original vjoy, which even C++ guys do not like).
Now I'm on Win XP machine with VS2008 and fixing Ramp Effect in SlimDX FFB...will fork it as well. Hopefully they'll accept pull requests.
You can use vJoyIOFeederWithFFB without FreePIE and send PWM to your Arduino.
That's what it is for.
If you want to use it inside FreePIE, you need to download source codes, Visual Studio (I'm using VS2015). Then write plugin interfacing vJoyIOFeederWithFFB. You can use just BackForceFeeder, which is console app: https://github.com/njz3/vJoyIOFeederWithFFB/tree/master/BackForceFeeder ...that should be simple to integrate. Or just use additional VJoy device and sent it to BackForceFeeder, which will send it to Arduino.