Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Ultrastik 360s ... #50

Open
dotorg opened this issue Mar 31, 2017 · 8 comments
Open

Problem with Ultrastik 360s ... #50

dotorg opened this issue Mar 31, 2017 · 8 comments

Comments

@dotorg
Copy link

dotorg commented Mar 31, 2017

To be honest, I have no idea if this is a problem with the umtool or the devices under Linux in general... but I'm out of things to try, so I'm hoping someone has an idea on it.

I have four sticks on my PC, and all of them work properly (with maps or in analog mode) in Windows.

Under Linux, all four are behaving identically -- at the right third and bottom third of their travel, they snap to max-right and max-down (jstest shows 0 anywhere except those areas, which snap to 32767). Anything up and left just reads zero, basically. That looks like a weird map behavior, but none of the maps in Windows do that.

When I use umtool, I get no errors:

./umtool ultistik_config.json
Loading ultistik_config.json...
[INFO] (ultimarc.c:53) Configuration is ULTISTIK. [Validated]
[INFO] (ultimarc.c:115) Updating Ultistik board...
[INFO] (ultimarc.c:136) Board update successful.

The config:

{
        "version" : 1,
        "product" : "ultistik",
        "controller id" : 1,
        "map size" : 9,
        "restrictor" : false,
        "flash" : true,
        "keep analog" : false,
        "borders" :
            [
                30, 58, 86, 114, 142, 170, 198, 226
            ],
        "map" :
            [
                "NW", "NW", "NW", "N", "N", "N", "NE", "NE", "NE",
                "NW", "NW", "NW", "N", "N", "N", "NE", "NE", "NE",
                "NW", "NW", "NW", "N", "N", "N", "NE", "NE", "NE",
                "W", "W", "W", "C", "C", "C", "E", "E", "E",
                "W", "W", "W", "C", "C", "C", "E", "E", "E",
                "W", "W", "W", "C", "C", "C", "E", "E", "E",
                "SW", "SW", "SW", "S", "S", "S", "SE", "SE", "SE",
                "SW", "SW", "SW", "S", "S", "S", "SE", "SE", "SE",
                "SW", "SW", "SW", "S", "S", "S", "SE", "SE", "SE"
            ]
}

No combination of keep analog true or false, or any combination in the map, makes any difference on any of the four devices. I know its seeing them because if I switch the product version to 2 it doesn't find them.

Looking at the code, I don't see any way to get more verbose output of what umtool is doing. Is there any way to get more info about what its doing, or better yet, what it thinks is configured on the joysticks?

Given that they work in Windows, not in Linux, and I'm not getting any errors, I'm thinking its not a umtool problem, but any details I can get out of it might be a clue whats going on.

@katie-snow
Copy link
Owner

Could you run these two tests. Configure your devices on Windows and do the jstest on Linux and see what output you get. The second test is to configure on Linux and test the devices on Windows and see if they behave correctly or not.

Katie

@dotorg
Copy link
Author

dotorg commented Mar 31, 2017

So configuring on Windows, and then running jstest, the stick works as-expected. Running the above configuration then breaks it -- same thing, 0 on both axis except the far right and far bottom, which snap to 32767.

Configuring on umtool and going to windows appears to behave as above, but my windows setup fires up Hyperspin and LEDBlinky sets a config as soon as it starts up, so I only have a brief moment to test it.

Now interestingly, I saw the problem on Linux before I'd compiled umtool... But I'd run RGBCommander, which isn't open sourced so I can't see its code, but I suspect it may be using the umtool code, as it includes the 21-ultimarc.rules verbatim. So its possible both it and umtool are configuring them wrong. (I suspect rgbcommander doing it initially, too, because I only had a single stick configured in umtool, but all four got configured wrong.)

So... that suggests maybe it was umtool that's doing it.

These are a bit older -- all four were bought in early 2014. Not sure what firmware version is in them.

@katie-snow
Copy link
Owner

Thanks for info. I have an Ultrastik that is about the same age. I will do some looking and get back with you.

@katie-snow
Copy link
Owner

The testing that I have done points me to Linux calibration. I can configure and test on windows successfully then move over to Linux without running umtool and can only move to the right and bottom.

I can't seem to get my distro of Mint to calibrate the joystick correctly. I will keep trying to get the calibration to work

@dotorg
Copy link
Author

dotorg commented Apr 14, 2017

Interesting, that's a different behavior than I'm seeing -- when I configure in Windows, they work in Linux with jstest until I run either rgbcommander or umtool. This is with Ubuntu. I wonder if Mint is starting up something that is causing a difference in behavior.

@rootrunner
Copy link

Hi, I just now stumbled upon this post. I didn't use any Ultrastik code from this project. It did trigger me to start writing RGBcommander and I surely learned a lot from this (very good) work. I used a small amount of code to learn how to connect to my PACled64 board in the beginning. The daemon has been completely rewritten twice since. I do use the 21-ultimarc.rules file though - it was extended to support the LEDWiz.
I worked together with someone in the states to code the u360 support (only v2 in my case) as I don't have that stick myself. I use the data contained in the maps supplied by Ultimarc in my code. As Ultimarc-linux and RGBcommander don't share code the cause has to be an underlying issue (be that system specific or more generic) or, but that is unlikely, we've both made the same mistake but to be honest I don't think so. The u360 part has really been thoroughly tested and it seems to me this issue would have been noticed. If it is still pending I could ask some people to test...

kind regards.

@dotorg
Copy link
Author

dotorg commented Jan 25, 2018

So, I had further issues that resulted in two of the sticks becoming corrupted to the point that I had to send the boards back to Ultimarc for re-flashing. Its unclear what corrupted them, but it seemed coincident with using one or the other of the Linux tools to update the maps on them. I don't know if its a coincidence, or an incompatibility with the firmware that was on them, or what... at this point I'm not going to risk them again, so I'm just leaving them in analog mode and not setting any maps into them.

@rootrunner
Copy link

it's weird. In the end we all need to send the correct data in the correct way to the stick be that program a or b on platform c or d or it just doesn't work. I know of a few 360's that are being used with success but I'm sure that those are more recent eg - not from 2014. Mystery...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants