Comments (31)
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.
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.
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.
Please, use presets.json
from package from last update and do not touch it as header says.
from linuxmotehook.
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.
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.
I've updated wiki entry. Do you have any further questions? I'll be glad to extend documentation if needed and help.
from linuxmotehook.
Any success getting last version working?
from linuxmotehook.
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.
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.
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.
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.
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.
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.
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.
It appear to work fine in PadTest and changing to 0.5 doesn't help.
from linuxmotehook.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Ok. I look forward to it.
from linuxmotehook.
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.
Is it ready yet?
from linuxmotehook.
Related Issues (8)
- Conflicts with Wii U Pro Controller HOT 9
- Problem launching in step 5 of the documentation - "Run main.lua in terminal" HOT 7
- Wiimote not recognised unless using direct input, gyro not working HOT 2
- Crash on recent GLib/libffi versions HOT 19
- lua5.3: ./autocalibrate.lua:43: bad argument #1 to 'format' HOT 2
- crash after starting yuzu emulator HOT 1
- bad argument HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linuxmotehook.