Git Product home page Git Product logo

Comments (31)

v1993 avatar v1993 commented on May 28, 2024

I'm nearly sure it is currently possible, but right mapping of axis might be tricky. You first have to make sure that existing configurations work as expected using PadTest before trying to create profiles yourself.

When you'll check out if existing ones are working as expected, I'll try to help you on this issue. Remember, use calibration values to modify directions, not profile settings. Do you have MotionPlus (either connected or built-in), by the way?

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

The existing configurations do work and I've tried adding a new profile in presets.json to try and make it work. I am using a Wii Remote Plus with MotionPlus built-in.

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

Well, first things first: presets.json:

// DO NOT EDIT THIS FILE. USE config.json TO OVERRIDE THESE SETTINGS.

So copy config.template.json to config.json and edit it instead. I'll try to figure out the correct configuration now. Have you supplied calibration values, by the way?

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

Please, use presets.json from package from last update and do not touch it as header says.

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

Oh I didn't notice that. What exactly do I change in config.json because there is no profile there to modify. I have supplied calibration values.

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

In version 0.2.2 I've added "Pointed away" profile which should be what you want. Also, hopefully, changes to config will help you to create your own profiles: just add them after last comment (old template lacked comma).

If needed, I'll elaborate a bit more on where and how to add profiles on wiki. Also, I'm going to give a quick description of new profile there.

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

I've updated wiki entry. Do you have any further questions? I'll be glad to extend documentation if needed and help.

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

Any success getting last version working?

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

I've tried the pointed away profile and while the rotations are correct, the camera keeps jittering around in Splatoon, even when laying the remote flat making the it unplayable.

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

Are you sure your calibrations are still applied (message to console is printed about this)? If yes, does the same happen in other profiles?

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

The other profiles also jitter. When I run it, it does say I am applying my individual calibration values. However, I'm not sure if they are exact as they can vary each time I run autocalibrate.lua.

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

Sadly, I don't think I can do anything about jittering, it's just what WiiMote reports. It is possible to add option of minimal valid rotation, but I'm not sure if that will help. If you wish, I can try to implement this.

Also, autocalibrate.lua may output a bit varying values because it just records movements and takes average, as there really is no (easy) way to read them directly from WiiMote Plus. It is good idea to let it run for half of a minute or so.

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

I think it would help a lot to have a way to calibrate while main.lua is running like wiimotehook does could just average three seconds. The big problem isn't really jitter but something more akin to Joycon drift only on the y axis where the camera moves to the extremes of up and down without moving the Wii Remote.

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

Is it working flawlessly in PadTest? Also, adding such ability would be a pretty big change as this requires to add whole level that handles interaction with user, let that be gui or console.

Have you tried reducing sensitivity? Try overriding axis values for gyro with 0.5 instead of 1 and -0.5 instead of -1, then when problem is gone figure out what axis is problematic and which one is not.

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

Is there a particular way it should be calibrated? Should it be lying down, upside down, in my hands, should I hold it?

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

It appear to work fine in PadTest and changing to 0.5 doesn't help.

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

Just leave it laying with zero movement applied, position does not matter. Have you tweaked gyro values, not acceleration? What is your resulting profile?

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

Can it be laying at an angle?
This is my calibration setup:
0x************: [-135, -155, -135, 0, 1, 1, 1]
I was changing 1,1,1 to zero and the third one is the problematic axis.

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

I also changed the autocalibrate script to average 3 seconds and there can be some extreme out liers because it is normally about -140, -140, -140, but sometimes gives something along the lines of -45, -110, -200.

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

3 seconds is far from enough for good value. Also, calibration setup is a wrong place to change calibration for profiles (it works, but it is still wrong). It's better to override it in individual profile configurations as shown below.

Try adding

		"gyro": {
			"p": ["z", 0.5]
		},

into your custom profile (you have derived one from Pointed away and are using it instead, don't you?) and see what happens.

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

I am using an unmodified Pointed away profile it is not custom. If I try to make a custom profile like that it errors and crashes.

(process:24732): xwiimote-cemu-WARNING **: 14:16:26.740: Failed to parse config file config.json: "/usr/share/lua/5.3/json/decode.lua:91: Unclosed elements present", continuing...
lua: /home/pika/Downloads/linuxmotehook/configloader.lua:126: Property `UseProfile` not found in config but is required
stack traceback:
        [C]: in function 'error'
        /home/pika/Downloads/linuxmotehook/configloader.lua:126: in local 'resolvePropertyDT'
        /home/pika/Downloads/linuxmotehook/configloader.lua:195: in main chunk
        main.lua:54: in main chunk
        [C]: in ?

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

Please, show your resulting config.json.

Tip: use ```JSON5 in the beginning for fancy syntax highlighting. It really helps to read reply.

P.S.: by the way, there is no need to censor your wiimote mac. There is really nothing anyone can do with it (not to mention that it is not really its Bluetooth MAC apparently).

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

What do you mean by ```JSON5 and fancy syntax highlighting?
Here is config.json

{
	// Profile to use
	"UseProfile": "Point",

	// Calibration data for your WiiMotes (example is for my). Use `./autocalibrate.lua` to figure out first three values
	// and PadTest for last three (-1/1). One in middle can be left zero.
	"Calibration": {
		0x0005057E0330: [-140, -142, -143, 0, 1, 1, 1],
	},

	// For information on how to create custom profile, read GitHub wiki
	// Add new profiles below this line
	
	"Point": {
		"basedOn": "base",

		"keys": {
			"up":		"up",
			"right":	"right",
			"down":		"down",
			"left": 	"left",

			"A":		"A",
			"B":		"B",
			"options":	"home"
		},

		"accel": {
			"x": ["x", 1],
			"y": ["z", -1],
			"z": ["y", 1]
		},

		"gyro": {
			"p": ["z", 0.5],
			"y": ["x", 1],
			"r": ["y", 1]
}

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

You didn't closed two braces in the end. Also, it's better to derive from Pointed away for you. Result should look like this:

{
	// Profile to use
	"UseProfile": "Point",

	// Calibration data for your WiiMotes (example is for my). Use `./autocalibrate.lua` to figure out first three values
	// and PadTest for last three (-1/1). One in middle can be left zero.
	"Calibration": {
		0x0005057E0330: [-140, -142, -143, 0, 1, 1, 1],
	},

	// For information on how to create custom profile, read GitHub wiki
	// Add new profiles below this line

	"Point": {
		"basedOn": "Pointed away",

		"keys": {
			// Here go your custom key overrides
		},

		"accel": {
			// Should be ok as-is
		},

		"gyro": {
			// Tweak sensitivity here
			"p": ["z", 0.5]
		}
	}
}

P.S. That's how you enable syntax highlighting: instead of

```
```

you use

```JSON5
```

(or replace JSON5 with any other language you're using)

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

Using that profile has the exact same problem as before. It still has drifting.
If I get different results from autocalibrate.lua which one should I accept as correct?

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

Using that profile has the exact same problem as before. It still has drifting.

What if you replace 0.5 with 0?

If I get different results from autocalibrate.lua which one should I accept as correct?

Doesn't really matter, they should be close enough. Just make sure that you gave enough time to script and didn't moved/rotated wiimote during calibration and you're good.

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

It still drifts up and down and even if I replace every sensitivity value with zero like this it will still jitter.

"gyro": {
	// Tweak sensitivity here
	"y": ["x", 0],
	"r": ["y", 0],
	"p": ["z", 0]
}

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

Hmm, so this is not due to gyro but thanks to accelerometer (?).

By the way, it seems that there IS a problem with acclelerometer directions dissonance with gyroscope in Pointed away, but it isn't present in Vertical.

It's late here, so I'll write more on this and release bugfix tomorrow.

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

Ok. I look forward to it.

from linuxmotehook.

v1993 avatar v1993 commented on May 28, 2024

Dang it! Sorry for not answering. I've deployed fixes for few related problems in the meantime (not released as I wish to close this issue if I can before release), but didn't got to look at another one.

from linuxmotehook.

Sayora77 avatar Sayora77 commented on May 28, 2024

Is it ready yet?

from linuxmotehook.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.