The online racing simulator
Test Patch 0.6N7
(135 posts, closed, started )
Rumble Gamepad F510 (logitech)
Gamepad

L-Stick up X Axis -
L-Stick down X Axis +
L-Stick left Y Axis -
L-Stick right Y Axis +

R-Stick up Z Axis -
R-Stick down Z Axis +
R-Stick left RX Axis -
R-Stick right RX Axis +
L-Trigger axe RY Axis +
R-Trigger axe RY Axis -

A 0
B 1
X 2
Y 3
LR 4
RB 5
Back 6
Start 7

D-pad Up 32
D-pad Right 33
D-pad Down 34
D-pad Left 35
Quote from K0Z3L_43V3R :I have multiple controllers, separate pedals and wheel, sometimes when I connect them in different order (wheel first or pedal first) or into different usb ports, button numbers and axis change, so I have to remap everything, can it be somehow fixed?
I have seen it in other games (Euro truck sim 2) where its working, controllers there have unique identifier or someting like, so they never change no matter how they are connected

Good point.

I've thought of one way to do this - LFS could sort the controllers by name (and maybe type).

So, the same set of X controllers will always be in the same order.

That should solve the problem of the order of connection and which ports you use. You would still need to do some reassignment if you removed or added a controller or changed to a different one.

Does that sound OK?

Note: For multiple controller combinations, LFS now saves separate config files so for example DEFAULT_3.con will be used if 3 controllers are detected and DEFAULT_8.con is loaded if 8 controllers are detected.


Quote from K0Z3L_43V3R :Rumble Gamepad F510 (logitech)
Gamepad
...

Thanks! Smile
-
(Ripley) DELETED by Ripley
Quote from Scawen :...
That should solve the problem of the order of connection and which ports you use. You would still need to do some reassignment if you removed or added a controller or changed to a different one.

Nice, thanks Smile
Quote from Scawen :Good point.

I've thought of one way to do this - LFS could sort the controllers by name (and maybe type).

So, the same set of X controllers will always be in the same order.

That should solve the problem of the order of connection and which ports you use. You would still need to do some reassignment if you removed or added a controller or changed to a different one.

Does that sound OK?

Note: For multiple controller combinations, LFS now saves separate config files so for example DEFAULT_3.con will be used if 3 controllers are detected and DEFAULT_8.con is loaded if 8 controllers are detected.



Thanks! Smile

I had the same issue forever. No restart for new controllers is good start but this solution is a huge step forward. There might be one issue though. Like for exampme I have 6 controllers max. There is various possibility with four or whatever less than the max. I am sure you can get it right anyway.
It should usually be OK. If you set it up for 6 controllers on one occasion, that will be saved (in DEFAULT_6.con). If you then go with 4 controllers, you will need to set up again. But that will be saved separately (in DEFAULT_4.con). If you go back to 6 controllers, it will load DEFAULT_6.con again and you don't need to setup this time, because you did that before.

It is likely to go wrong if you use a different set of 6 controllers. But if it's always the same 4 or the same 6 then it should work fine. There is the possibility of manually backing up the DEFAULT_X.con files if you like.
Quote from Scawen :

Please can you tell me the text description shown at the top right of the controls options screen (the controller name and type of controller, in title colour, default yellow).


I get this message on the top right:

Controller (xbox360 wireless receiver for windows) Gamepad


It's not wireless, it's not 360 and not even Xbox but that's how it's shown. The driver emulates a Xinput controller because it's pretty much the standard now since the xbox360 controller was released more than 10 years ago so it's a pain for people playing on a Direct Input gamepad unless they emulate to Xinput.

I'm sure if you support the Xinput mapping by default you'll make 95% of gamepad users happy as most of them are on a Xbox360 or XboxOne controller.
Quote from Scawen :Please can you tell me the text description shown at the top right of the controls options screen (the controller name and type of controller, in title colour, default yellow).

XBOX 360 For Windows (Controller)
Gamepad


I also tried the xbox 360 controller on my arch liunx install (linux kernel 4.5-1, wine 1-9.6). It supports separate axes out of the box, which is a nice surprise. LFS sees this as a joystick in this case.

As far as managing different controllers goes, I think that most controllers will provide a serial number alongside the Standard USB Identifier (vendor-code:model-code), so maybe a .con file could be unique to each controller.
Thanks for the help. 0.6N3 is now available.

Controllers may now be plugged in or removed after LFS has started, and there is a refresh button on the controller setup screen. Multiple controller support is much better and should not lose your settings depending on which USB ports you use, etc, but multiple controller setups will need to be reassigned this time.

Some of you with a single game controller, please could you test the automatic controller setup? With LFS not running, look in data\misc and move or rename your controller's .con file, so LFS can't see it. Then when you start LFS it should try to set it up automatically, in a way that is similar to some other games. In particular, does it get the triggers right?

Thanks.

Changes from 0.6N2 to 0.6N3 :

VR :

Rift headphones are now used for sound output (default setting)
Rift remote can now be used for click / escape / virtual keyboard
Improved appearance of top row (ESC / F keys) of virtual keyboard

Controllers :

Controllers may now be plugged in and detected after LFS is started
Refresh button to detect controllers in Options - Controls screen
Controllers are now sorted (not dependent on order of connection)
Separate controller type setting for with / without controllers
Automatic controls assignment for various game controllers
Warning when you press ESC to exit controller setup screen
Button functions are now easier to see when in car

Fixes :

Axis names were previously displayed wrongly in Options - Controls
It was possible to enter a state where chat box could not be opened

https://www.lfs.net/forum/thread/89352
Xbox 360 controller: all axes are correct, but throttle/brake are reversed. It defaulted to throttle/brake invert 1, while invert 0 gives correct setup. (assuming we want throttle on right, brake on left)


Did some laps without sound, its amazing how much immersion breaks when the car starts to slide (or, how important sound is in immersion). I'm sure you were already planning on it, but I think updating the tire sound process while you're in that rabbit hole will provide a huge boost to immersion, especially for new VR users that may not have a FFB wheel.
Since we're working on the controller, Would it be possible we could add something for the steering axis similar to what you can do with keyboard(steer rate/return rate) for those of us playing with handheld controllers such as PS4, Xbox controllers.

Edit: Xbox one controller doesn't get the Accel/Brake settings correctly. Mine are reporting as combined, and the default setting is separate. Changing to combined causes the correct axis to be selected, but invert is set to 1 by default, which as bobloblaw is the opposite of what you'd expect. All other settings seem reasonable

Also something that's slightly annoying, When running Win 10 technical preview, and they release a new update it seems to wipe out my license from LFS.

Edit 2: and if possible on top of the first point(which at that alone would be very much appreciated!), possibly add it to where we are able to adjust the multiplier/sensitivity for all axes not just the steering. kind of like how Mouse X and Mouse Y work where you're able to.

Another thing that could be useful would be to map the right joystick to being the look heading, but being able to set a limit for it, like all the way left is 90, all the way right is 90, and pressing the joystick down would be look behind
I can confirm what bobloblaw is saying about the throttle and brake being reversed (on a PS3 controller) after renaming the .con file and starting LFS again.

The steering axe is alright though.
Quote from bobloblaw :Xbox 360 controller: all axes are correct, but throttle/brake are reversed. It defaulted to throttle/brake invert 1, while invert 0 gives correct setup. (assuming we want throttle on right, brake on left)

Thank you for the test and feedback.

Quote from bobloblaw :Did some laps without sound, its amazing how much immersion breaks when the car starts to slide (or, how important sound is in immersion). I'm sure you were already planning on it, but I think updating the tire sound process while you're in that rabbit hole will provide a huge boost to immersion, especially for new VR users that may not have a FFB wheel.

I was a bit confused at first but I think you mean when I get stuck into the tyre physics again?

Quote from T3charmy :Since we're working on the controller, Would it be possible we could add something for the steering axis similar to what you can do with keyboard(steer rate/return rate) for those of us playing with handheld controllers such as PS4, Xbox controllers.

Thanks for your suggestions. I'll pass them through my mind but I don't really expect to dive deep into controller support at this time.

Quote from T3charmy :Edit: Xbox one controller doesn't get the Accel/Brake settings correctly. Mine are reporting as combined, and the default setting is separate. Changing to combined causes the correct axis to be selected, but invert is set to 1 by default, which as bobloblaw is the opposite of what you'd expect. All other settings seem reasonable

I am not sure why your XBox one controller doesn't have separate axes. Mine (a wireless one that came with the Rift engineering sample) does have separate axes, just using the Microsoft auto-installed driver. I'm not sure how I can distinguish between the two. Does yours report only 5 axes? Mine reports 6.

Quote from Skytrill :I can confirm what bobloblaw is saying about the throttle and brake being reversed (on a PS3 controller) after renaming the .con file and starting LFS again.

Thank you for this test. Actually I got that inverse setting from your original post (see below) also stated by K0Z3L_43V3R, though I think he was doing a copy / paste + edit of yours. Big grin I'll set invert to 0 for the next update.

Quote from Skytrill :
L-Trigger axe RY Axis +
R-Trigger axe RY Axis -

I guess you got the L and R the wrong way round. Anyway, LFS now reports the correct axis names and you should see those triggers with Z axis now, instead of RY (LFS displayed wrongly all these years).
Quote from bobloblaw :As far as managing different controllers goes, I think that most controllers will provide a serial number alongside the Standard USB Identifier (vendor-code:model-code), so maybe a .con file could be unique to each controller.

DirectInput does provide a couple of GUIDs, one for the device model (product) and one for the instance. The product one is unique to the manufacturer+model, but two controllers of the same model will share the same GUID. The instance one will be unique even if multiple of the same model controller are connected, but there's no guarantee that it'll be consistent for a specific controller if you plug into a different USB port (it probably won't) and it certainly isn't consistent across different machines/drivers.

I have no idea if it's possible to map a DirectInput device to the USB hardware information (which *may* contain a unique serial number, but rarely does) - I suspect not.


Regarding the combined axes on the triggers - IIRC you *have* to use XInput to be able to split the axes on the XBox/XBox360 controllers. I have no idea about XBoxOne.

Edit:
I've been messing around with DirectInput lately - I'll see if I can do anything useful with the X360 controller this weekend if I get time.
Yep, only 5, Just bought the controller + wireless adapter for windows from the store about 3 weeks ago. LFS reports "Controller (Xbox One For Windows) Gamepad". Only have 5 axes. X axis, Y Axis, Z Axis, RX Axis, RY Axis. Also using the auto-installed driver. Running Windows 10 1511 at the moment. (Also see my previous post about an issue related to windows 10 tech preview).
Quote from Scawen :

Thank you for this test. Actually I got that inverse setting from your original post (see below) also stated by K0Z3L_43V3R, though I think he was doing a copy / paste + edit of yours. Big grin I'll set invert to 0 for the next update.

I guess you got the L and R the wrong way round.

Oups! sorry about that!
Could it be done so the Clutch setting is set to "axis" by default for steering wheels with a clutch pedal?
That's a nice addition. When I bought my G27 I was unpleasantly surprised that I had to configure everything by myself in LFS - like it's some very rare imput device. It's good to have some default presets for - at least - the most popular controllers.
Quote from Scawen :I was a bit confused at first but I think you mean when I get stuck into the tyre physics again?

Stuck I hope is not the right word Smile.

Quote from Degats :I have no idea if it's possible to map a DirectInput device to the USB hardware information (which *may* contain a unique serial number, but rarely does) - I suspect not.


Regarding the combined axes on the triggers - IIRC you *have* to use XInput to be able to split the axes on the XBox/XBox360 controllers. I have no idea about XBoxOne.

I did not realize that we're dealing with a windows API, which I should have noticed, lol. My only (limited) experience with USB was with lower level stuff in linux, where there are more ways to solve this type of problem. Also, I had no idea Xinupt was an option for the 360 controller. I kept an XP install around just so I could use the XBCD driver.
Quote from Ripley :I have a Logitech DFGT wheel if that serves.
I can report back its buttons and such in 10 hours or so...

I was thinking about this. Sorry about my slow reply. Was a bit busy getting my head around the other things.

I could add an auto-setup for the DFGT. I wonder how similar it is to a G27. On finding an unknown wheel, LFS natively does G27 style button and axis assignments.

Please could you try renaming the .con file before you start LFS? Then start LFS and try the controls to see if anything's wrong with them. I guess there will be something! Smile

Also, what is the name as displayed at the top right of the controller screen? So LFS can identify it and apply special setting.

If you want to report axes, please use 0.6N3 which displays the correct axis names.

Thanks!
..
I also have DFGT,so I tried to connect after renaming old .con file. The name is shown as 'Logitech Driving Force GT USB' and most controls are like they should be - that is steering,pedals and shifter buttons behind wheel. Also look left/right buttons are assigned pretty logically and horn,handbrake,speed limiter and TC buttons are set to buttons,which have playstation cross,circle,square and triangle symbols. VR click is set to center button and virtual keyboard to small button below. For some weird reason gears 1 to 6 are assigned to few buttons and the shifter stick...
But for better overview I made a little grafical button chart,hope it will help.
Attached images
DFGT buttons.jpg
..
Could this have something to do with fact that you have 2 devices plugged in,where DFGT is shown as 2nd? Shrug

Edit: Did plug a gamepad and DFGT - gamepad was shown as 2nd in list and also had different numbers for buttons as they were when gamepad was connected alone.
..
Quote from T3charmy :Yep, only 5, Just bought the controller + wireless adapter for windows from the store about 3 weeks ago. LFS reports "Controller (Xbox One For Windows) Gamepad". Only have 5 axes. X axis, Y Axis, Z Axis, RX Axis, RY Axis. Also using the auto-installed driver. Running Windows 10 1511 at the moment. (Also see my previous post about an issue related to windows 10 tech preview).

Strange that mine has the RZ axis as well, separately. Maybe Windows 7 is better. Wink

Anyway, now I'm setting it to dual axis if the controller has 6 axes, combined axis if it has 5 axes.

Quote from Flame CZE :Could it be done so the Clutch setting is set to "axis" by default for steering wheels with a clutch pedal?

Good suggestion, thanks. I recently noticed the axes have a name when they are enumerated, and one of them is "Clutch" on the G27. So I've now used that and set Clutch to "axis" in this case.

Quote from cargame.nl :Hhmm if we start to talk about DFGT then I cannot resist to stay silent ...

Thanks for the info and screenshot. In the multiple controller case, LFS isn't going to be very helpful at the moment.

Anyway, for single wheels, I've now set it to default to 900 degrees wheel turn if the wheel name contains "g25" or "g27" or "driving force". For other wheels the default is 270.

Quote from Eclipsed :I also have DFGT,so I tried to connect after renaming old .con file. The name is shown as 'Logitech Driving Force GT USB' and most controls are like they should be - that is steering,pedals and shifter buttons behind wheel. Also look left/right buttons are assigned pretty logically and horn,handbrake,speed limiter and TC buttons are set to buttons,which have playstation cross,circle,square and triangle symbols. VR click is set to center button and virtual keyboard to small button below. For some weird reason gears 1 to 6 are assigned to few buttons and the shifter stick...
But for better overview I made a little grafical button chart,hope it will help.

Thanks for all the information and picture with numbers.

The gears are assigned because of the G27 shifter. I have now set it to only assign the shifter buttons if the name containts "g25" or "g27".
This thread is closed

Test Patch 0.6N7
(135 posts, closed, started )
FGED GREDG RDFGDR GSFDG