Joystick control

View previous topic View next topic Go down

Joystick control

Post by call2 on Sat Jan 21, 2017 2:42 pm

I have always used a USB joystick for BVE operation and for the last few years it has been a Speedlink Black Widow joystick running under Widows 8.1, (OpenBve version 1.2 /1.4).

When I attempted to load and run OpenBve version 1.5.0 I soon found out that I could not configure it in the Customise controls section. It is detected and shows the controls working, but configuring a control does not work. 

Searching through posts on this forum, there is very little information about joystick operation. Is it possible yet with v1.5.0.4, and if so how? I have tried direct editing of the relevent control files, and that did not work either.

Tony

call2

Posts : 29
Join date : 2011-08-31

Back to top Go down

Re: Joystick control

Post by leezer3 on Sat Jan 21, 2017 3:03 pm

My joystick seems to be working normally here, so I can't do too much more Sad

If it's showing up in the controls menu, it's been detected and the program recognises it OK.
To set a control, you need to click in the grab box, then move the stick- Have you definitely clicked in the box (Goes red)

Other troubleshooting thoughts:
Are all axis centered when you try to configure a control? (Specifically thinking of a throttle lever)
That could stuff things up, but I might be able to do something to help with that specific case.

leezer3

Posts : 838
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Joystick control

Post by call2 on Sat Jan 21, 2017 3:41 pm

Yes, I see the box go red when I click on it and move the control, but no matter which control I move, the assignment section always shows "joystick 1, axis 1, negative direction". Even if I try to set primary/secondary horns, the program 'sees' the Hat1 or Hat2 but then assigns "joystick 1, axis 1, negative direction".

EDIT: The Axis' are all centred but the indicators show that they are not.

call2

Posts : 29
Join date : 2011-08-31

Back to top Go down

Re: Joystick control

Post by leezer3 on Sun Jan 22, 2017 9:54 pm

OK, I've pushed a tweak which will help for this for the current nightly (22/01/17), but it's not perfect.

Two primary issues here:
1. Your joystick axis reporting as not being centered. I'm not sure I've got control of this one, try calibrating the joystick through Windows as a first step. If not dunno.....
2. If a joystick with a non-centered axis was connected and you attempted to set a control, it would grab this axis wrongly. This appears to be Michelle's bug, but I've now changed it so that it ignores axis values which don't change, even if they're not centered Smile


Final small issue is one that I can't do anything about-
You'll notice that (if) your joystick has a non-centered axis when the program loads, you need to move it slightly or press a button for the image to update. Nothing that can be done about this one; It's a limitation of OpenTK.

leezer3

Posts : 838
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Joystick control

Post by call2 on Mon Jan 23, 2017 9:38 am

Thanks for your time attempting to fix this problem. I calibrated the joystick in Windows yesterday afternoon, no problem. I applied the nightly update, but still cannot get my joystick to calibrate in OpenBve 1.5.0.x.

I have two identical PCs. I use one for backups and 'experiments', and the other is my 'live' PC, so that I always have a working BVE! I installed v1.5.0.x onto the 'experiments' PC. I only have one joystick so I move it to the PC that I need it on. I also checked that the joystick drivers are identical on both PCs - they are not - and so that is an area that I'm looking at presently.

The 'live' PC has BVE 1.4.3 on it at present, and the joystick works perfectly. I can configure the controls without fault. I will install a fresh copy of OpenBve v1.4.3 onto the experiment PC sometime today, and prove the joystick works correctly with v1.4.3 on both PCs.

call2

Posts : 29
Join date : 2011-08-31

Back to top Go down

Re: Joystick control

Post by leezer3 on Mon Jan 23, 2017 2:43 pm

No trouble, especially if it's my builds that have broken it Smile

It's very hard for me to debug joysticks (or anything physical for that matter!) without having it in my hand to actually see what's going on in the debugger.

I don't suppose you can figure out what the axis it's detecting as non-centered is?
I'd strongly suspect it's the throttle, but don't know.

I also note that the Saitek page suggests uninstalling their drivers to calibrate the stick, but I honestly have no idea why; This should not be necessary....

leezer3

Posts : 838
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Joystick control

Post by call2 on Mon Jan 23, 2017 2:50 pm

Rolling Eyes   Yeah...right!

It is the throttle increase power. I'm trying to find some different drivers for this problem, and because one machine running v1.4.3 is ok, I would obviously like to use the same ones in the PC running 1.5.0. x.  Sounds easy doesn't it?  Ha! Damn Windows.

call2

Posts : 29
Join date : 2011-08-31

Back to top Go down

Re: Joystick control

Post by Northern Line on Wed Jan 25, 2017 1:42 pm

I have Saitek Pro Flight X55 controls which are two seperate controls, a stick and a throttle quadrant, included with toggle switches, buttons and rotaries, the only problem I have is the build of openbve not starting because there's too many buttons for the game to handle. so as a result it won't start.
avatar
Northern Line

Posts : 277
Join date : 2011-07-12
Age : 23
Location : Tooting, London, England

http://www.bve-district.co.uk/

Back to top Go down

Re: Joystick control

Post by call2 on Fri Jan 27, 2017 1:41 pm

I think that I have made some progress on the Speedlink Black Widow joystick problem. I have installed the manufacturers 5.1 drivers, and with all of the joystick thrust controls, (A1-A4), physically centred, the Customise Controls menu of BVE 1.5.0.4 incorrectly shows all the joystick controls are in the 100% positive position, (bottom half all red). The joystick threshold is set in mid position in the Options section.

On my other PC, where I have OpenBve v1.4.3 and the same drivers and the same options set in the controls menus, the joystick thrust levers show up correctly, and work correctly.

Is there any way that you can set the A1-A4 menu at the 50% position?

Tony

call2

Posts : 29
Join date : 2011-08-31

Back to top Go down

Re: Joystick control

Post by leezer3 on Fri Jan 27, 2017 2:55 pm

The short answer is that the front-end only passes on what I'm seeing from the joystick backend (openTK), which in this case appears to be obviously wrong Sad


If you try the latest daily build, I've made a change so that it'll co-exist peacefully with 1.4.3 on the same machine (You'll need to delete the controls.cfg file found under %Appdata%\openbve\settings ), but I haven't made any other changes that'll help....

Will try and get my hands on a few more joysticks and test, but problems with a physical item are so much harder to test Smile

leezer3

Posts : 838
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Joystick control

Post by leezer3 on Fri Jan 27, 2017 3:48 pm

Aha, you've just discovered an openTK bug with joysticks returning a HID usage page of 1 (They shouldn't be...)

I've now reproduced and fixed this with a PS3 pad connected via USB, and will update the nightly build shortly as well as submitting this to openTK Smile
(The other three pads and sticks I've got floating around don't do this....)

http://vps.bvecornwall.co.uk/OpenBVE/Builds/OpenBVE-2017-01-27.zip

Should hopefully fix the Speedlink issue.

Northern Line:
Have mentioned this before, but you're hitting up against a hard limit in openTK. Nothing I can do on this front at the minute without breaking compatibility elsewhere.
The unplug the stick message is the best I can do, otherwise it just hard crashes.

leezer3

Posts : 838
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Joystick control

Post by Northern Line on Sat Jan 28, 2017 5:37 am

leezer3 wrote:Have mentioned this before, but you're hitting up against a hard limit in openTK. Nothing I can do on this front at the minute without breaking compatibility elsewhere.
The unplug the stick message is the best I can do, otherwise it just hard crashes.

It's fine Chris, thanks for letting me know Smile . 1.4.2 seems to be working for me at the moment, it recognises both joysticks so I'm sticking with it for now.
avatar
Northern Line

Posts : 277
Join date : 2011-07-12
Age : 23
Location : Tooting, London, England

http://www.bve-district.co.uk/

Back to top Go down

Re: Joystick control

Post by call2 on Wed Feb 01, 2017 10:01 pm

The latest nightly builds didn't fix the joystick problems, Chris. Sad

EDIT:
DIS-REGARD THIS:
I forgot to ask before, but the SINGLE_FULLAXIS command is not available anymore in the Customize controls menu, and I cannot add the command either. It controls the power and brake on one full axis for single handle controllers, for most EMU/DMU operation. Is that to be a future feature?
SEE NEXT POSTS,

Tony


Last edited by call2 on Fri Feb 03, 2017 10:13 am; edited 1 time in total (Reason for editing : Might cause confusion.)

call2

Posts : 29
Join date : 2011-08-31

Back to top Go down

Re: Joystick control

Post by leezer3 on Thu Feb 02, 2017 12:04 pm

Oops, SINGLE_FULLAXIS seems to have gone missing somewhere, no idea how that happened  Laughing

Will fix that tonight when I get back from work.

I'm also trying to get my hands on a Black Widow stick, and will try and get that working properly for you assuming I can.

leezer3

Posts : 838
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Joystick control

Post by leezer3 on Thu Feb 02, 2017 8:59 pm

OK, having looked at what's going on, the SINGLE_FULLAXIS is actually there Smile

It's not actually in the 'default' controls, and doesn't appear to be in the default controls for my copy of 1.4.3 either, presumably because it's only ever of use when a joystick is connected Smile

To add it, use the 'Add Control' button and select it from the control dropdown.

Will try and remember to do some fiddling with this so that it appears automatically when a joystick is connected as having to remember to add it isn't necessarily a good thing....

leezer3

Posts : 838
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Joystick control

Post by call2 on Fri Feb 03, 2017 10:20 am

I'm sorry to say that I just didn't see the SINGLE_FULLAXIS command in the Add Control dropdown box, (O 'eck  Embarassed).

I've added it the the controls but because of the basic problem with the joystick thrust controls not being sensed correctly, it still cannot be configured.

call2

Posts : 29
Join date : 2011-08-31

Back to top Go down

Re: Joystick control

Post by ecreek on Sun Feb 05, 2017 4:47 am

My problem is that the full extent of the axis is not read on A1 axis. I have assigned this to the brake on a single axis so it means that the break is never fully released.
I have calibrated the axes in windows joystick control where the axes are fully read. I am using a USB controller interface with a homebuilt control console.

In older versions of OBVE this is not a problem.

I may have mentioned this before but it seems a good opportunity to raise it again.

Thanks,

Michael

ecreek

Posts : 32
Join date : 2011-08-23

Back to top Go down

Re: Joystick control

Post by leezer3 on Sun Feb 05, 2017 7:48 pm

OK, having got my hands on a Speedlink stick, I think I understand the root of the problem here, which is probably related to your issues ecreek Smile

The stick is returning an axis range of -128 to 128, rather than 0 to 256, which is confusing things internally in openTK.
I'll have to do some fiddling, but will get this sorted.

Edit:
And fixed this particular case Smile
That's two nasty obscure openTK bugs......

Please try the build from today:
http://vps.bvecornwall.co.uk/OpenBVE/Builds/OpenBVE-2017-02-05.zip

The change for this build will *only* effect Windows. I'll spin up a VM for Linux tomorrow and try testing this stick.

Edit 2:
ecreek- If this doesn't fix your issues, can you let me know what you're using for the backend of your control console, and (if you know them) the LogicalMin and LogicalMax its HID page return.
I should be able to do some more digging with these Smile

leezer3

Posts : 838
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Joystick control

Post by ecreek on Mon Feb 06, 2017 1:06 am

Something broke between the nightly build 26/1 and 27/1. The A1 axis is now recorded as joystick 1, hat 1, left. Prior to that it was ok and read as an axis.
The movement of the axis is recorded in the axis gauge but still only goes to about 75% on the latest build.

I don't know those HID figures but here is a link to the controller -

http://www.leobodnar.com/shop/index.php?main_page=product_info&products_id=180

Thanks

ecreek

Posts : 32
Join date : 2011-08-23

Back to top Go down

Re: Joystick control

Post by leezer3 on Tue Feb 07, 2017 1:20 pm

Right, thanks Smile

I've found some documentation on what's going on inside the controller, and it's not pretty:
http://members.aon.at/mfranz/bu0836a.html

TLDR explanation:
Your controller returns a rather odd data implementation with a placeholder byte in place of unused axis.
openTK is misinterpreting this placeholder byte as the LogicalMinimum, hence why it's sticking.

It's also identifiying itself as a joystick, but returning it's axis described as a collection of mouse pointers, which is rather outside the standards.....
The change on 27/1 blocked joysticks from adding mice pointers as an axis, as the Black Widow and a PS3 pad I've got here both seem to return a buggy mice pointer value.


I don't know off the top of my head why it's now reporting as a hat, but the implementation is very non-standard.

leezer3

Posts : 838
Join date : 2011-08-23

http://www.bvecornwall.co.uk

Back to top Go down

Re: Joystick control

Post by call2 on Wed Feb 08, 2017 12:22 am

The 2017-02-15 build has fixed all of the problems with my joystick, Chris. Thanks for your patience and tenacity.

I'm delighted that my relatively inexpensive Speedlink joystick works so well with BVE. I just could not find anything better on the market. Now that I can use it with v1.5.0, I'm really happy.

Well done, Chris.

Tony

call2

Posts : 29
Join date : 2011-08-31

Back to top Go down

Re: Joystick control

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum