custom joystick electronics

Moderators: Uros, Tom, OXO

echofive
Posts: 22
Joined: Mon Jul 23, 2018 8:23 am

custom joystick electronics

Post by echofive » Mon Jul 23, 2018 8:29 am

C2 does not recognise my custom joystick electronics. FlightGear recognises it just fine. So does HTML5 Gamepad Tester.
It is a ProMicro board from Sparkfun using their joystick example code extended to read the control positions using a magnet on each control and magnetic field sensors (also from Sparkfun).
Has anybody done this kind of thing with C2 successfully?

User avatar
EDB
Posts: 1575
Joined: Mon Oct 31, 2011 1:17 am
Location: The Netherlands, Europe Continent, Earth Planet, Milky Way Galaxy, Virgo Super Cluster

Re: custom joystick electronics

Post by EDB » Mon Jul 23, 2018 10:41 am

No experience with ProMicro board from Sparkfun here, but like the ones from Leo Bodnar they should work like A regular Windows stick.
Check if it is recognized by Windows USB Game Controllers. And calibrate it. That should be enough.

And assign the axis,, buttons, etc in Condor Setup...

janjansen
Posts: 1094
Joined: Wed Feb 24, 2016 9:26 pm

Re: custom joystick electronics

Post by janjansen » Mon Jul 23, 2018 11:34 am

If in the windows joystick test/calibration app you can not achieve almost maximum deflection, condor setup will not assign the stick/axis. The movement needs to exceed ~90% of the maximum range before its being picked up.

If you can not change this range in the firmware of your stick, you should be able to assign the controller manually by editing controls.ini
C:\Users\yourname\Documents\Condor\Pilots\yourpilot

Let me know if you need help with that.

echofive
Posts: 22
Joined: Mon Jul 23, 2018 8:23 am

Re: custom joystick electronics

Post by echofive » Mon Jul 23, 2018 4:49 pm

I verified maximum deflection with the html5 tool (http html5gamepad com) .
Is there an explanation somewhere of how to configure controls.ini?
Do you know of any particular tests in Windows or Condor2 that would allow a game controller to be recognised by html5gamepad but not by Condor2?
I did notice that the devices picture in Windows looked a bit different between my controller and a Logitek .

echofive
Posts: 22
Joined: Mon Jul 23, 2018 8:23 am

Re: custom joystick electronics

Post by echofive » Mon Jul 23, 2018 4:53 pm

EDB please explain "Windows USB Game Controllers".
So far I have only that html5 site for verifying the controller.

User avatar
timbaeyens
Posts: 261
Joined: Mon Sep 12, 2005 1:31 am

Re: custom joystick electronics

Post by timbaeyens » Mon Jul 23, 2018 6:27 pm

Go to Control Panel: Control Panel\All Control Panel Items\Devices and Printers

Find your USB controller under Devices

Right click, and click Game controller settings

Check Status of your controller to be "OK"

Highlight your USB controller

Click Properties

Click Settings tab

Click Calibrate button
TT

User avatar
EDB
Posts: 1575
Joined: Mon Oct 31, 2011 1:17 am
Location: The Netherlands, Europe Continent, Earth Planet, Milky Way Galaxy, Virgo Super Cluster

Re: custom joystick electronics

Post by EDB » Mon Jul 23, 2018 7:16 pm


User avatar
EDB
Posts: 1575
Joined: Mon Oct 31, 2011 1:17 am
Location: The Netherlands, Europe Continent, Earth Planet, Milky Way Galaxy, Virgo Super Cluster

Re: custom joystick electronics

Post by EDB » Mon Jul 23, 2018 7:54 pm

If you have multiple controllers you can select a "Preferred Device" in the Game Controllers control panel by clicking the "Advanced" button and selecting the device...

janjansen
Posts: 1094
Joined: Wed Feb 24, 2016 9:26 pm

Re: custom joystick electronics

Post by janjansen » Tue Jul 24, 2018 11:27 am

echofive wrote:
Mon Jul 23, 2018 4:49 pm
I verified maximum deflection with the html5 tool (http html5gamepad com) .
and you are getting -1 to +1 ?
Is there an explanation somewhere of how to configure controls.ini?
Not really. its a bit of a hack. And if your controller has no buttons, it may be difficult to use as I dont know how to obtain the hardware identifier that condor uses. For instance, for my joystick I see this:

Code: Select all

[{91A5FF50-C9EF-11E5-8001-444553540000}]
0=0
1=4
2=20
4=24
2005=32
3018=53
3019=52
3020=54
3021=55
3036=49
3063=51
3064=50
That first string identifies the joystick, but I have no idea where to find that, its not even in the registry. If your device has a button, and you can map that button to anything in condor, you may be able to obtain it that way.

The first series of numbers are the condor controls. I think zero is aileron, 1 is elevator, 2 is rudder etc. The large numbers are functions like flaps, PDA,..
The second series of numbers identify the joystick axis (or button) and direction.
Do you know of any particular tests in Windows or Condor2 that would allow a game controller to be recognised by html5gamepad but not by Condor2?
I did notice that the devices picture in Windows looked a bit different between my controller and a Logitek .
I have no idea Im afraid. Most problems I have seen with condor not recognizing a game controller are due to not enough "deflection". If thats not it, I dont think I can help you.

echofive
Posts: 22
Joined: Mon Jul 23, 2018 8:23 am

Re: custom joystick electronics

Post by echofive » Tue Jul 24, 2018 4:16 pm

thank you janjansen.
There is definitely enough deflection. -1 to +1 indicated by html5gamepad. And the whole 8-bit range indicated by print statements in the arduino code of the proMicro joystick controller. That is the same range as comes from the Logitek joystick that condor does recognise.
Would you, please, tell me what html5gamepad reports for your joystick? And see how that relates to what is in controls.ini for that stick? Especially that identifier ([{91A5FF50-C9EF-11E5-8001-444553540000}]). I tried to make the identifier of mine match the Logitek's identifier without success. It even is reported differently by html5gamepad in a linux machine vs a windows machine.
Cheers,
Mike/echofive

janjansen
Posts: 1094
Joined: Wed Feb 24, 2016 9:26 pm

Re: custom joystick electronics

Post by janjansen » Tue Jul 24, 2018 8:44 pm

html5gamepad reports:

1 SideWinder Force Feedback 2 Joystick (Vendor: 045e Product: 001b)

When I first needed to edit that file, I assumed it was a USB id, but Ive since looked everywhere, searched the registry, looked at all the properties in device manager and driver settings, I have even googled it, I dont know where that ID comes from or how to construct it :(

Im guessing the ID is given by some directx API call? You could try running dxdiag and see if your controller shows up in the input devices tab. But even if it does or does not, I dont see how that will solve your problem.

Uros?

User avatar
timbaeyens
Posts: 261
Joined: Mon Sep 12, 2005 1:31 am

Re: custom joystick electronics

Post by timbaeyens » Tue Jul 24, 2018 9:49 pm

It is the USB ID code for both the vendor and product :

https://www.the-sz.com/products/usbid/i ... &p=001b&n=
TT

janjansen
Posts: 1094
Joined: Wed Feb 24, 2016 9:26 pm

Re: custom joystick electronics

Post by janjansen » Tue Jul 24, 2018 10:02 pm

timbaeyens wrote:
Tue Jul 24, 2018 9:49 pm
It is the USB ID code for both the vendor and product :

Code: Select all

Vendor: 045e Product: 001b
is the USB code.
The question is what

Code: Select all

91A5FF50-C9EF-11E5-8001-444553540000
stands for in controls.ini.

User avatar
timbaeyens
Posts: 261
Joined: Mon Sep 12, 2005 1:31 am

Re: custom joystick electronics

Post by timbaeyens » Tue Jul 24, 2018 10:58 pm

It is a CLSID or Class Identifier used to represent a specific instance of a Component Object Model or COM-based program.

Google parts of the code gave me this - I am totally out my depth here... ;)
TT

User avatar
Pit_R
Posts: 1348
Joined: Mon Feb 27, 2006 7:16 pm

Re: custom joystick electronics

Post by Pit_R » Wed Jul 25, 2018 2:43 pm

Try UCR (+ vJoy)
With Universal Control Remapper you can map your custom stick to vJoy and vJoy to Condor 2.

UCR: https://autohotkey.com/boards/viewtopic.php?t=12249
vJoy: http://vjoystick.sourceforge.net/

Good luck!
No matter where you go... There you are...

Image
:::: Please use this envelope
Image
to send me a PM.

Post Reply