Comments (13)
Sure, we could figure out how it works together!
I didn't have that Xkeys available so the implementation was a pure guess to be honest, but if we log the output from the device, it should be fairly easy to implement the support correctly.
I could get back to you tomorrow with a test-script to run, sounds good?
from xkeys.
Perfect! I will have time at some point or another to run through whatever needs done
from xkeys.
Here's a quick script I put together just now:
logHMI.zip
It simply logs all data to a file (log.txt).
Connect your xkeys, run the script, pull the shuttle and then post your results here!
It would also be very helpful it you edit the logfile after recording, adding explanations on what you where doing, like this:
Log.txt:
2018-1-22 07:18:26.310 Listening to device (1):
2018-1-22 07:18:26.312 manufacturer P. I. Engineering
2018-1-22 07:18:26.315 product XK-24 HID
2018-1-22 07:18:26.320 vendorId 1523
2018-1-22 07:18:26.324 productId 1029
2018-1-22 07:18:26.327 usage 1
Pressed the button on top left:
2018-1-22 07:18:27.228 1 data 01000100000000095f5a00000000000000000000000000000000000000000000
Released the button on top left:
2018-1-22 07:18:27.411 1 data 0100000000000009600c00000000000000000000000000000000000000000000
Continued clicking some buttons:
2018-1-22 07:18:27.603 1 data 010002000000000960c800000000000000000000000000000000000000000000
2018-1-22 07:18:27.739 1 data 0100000000000009615000000000000000000000000000000000000000000000
2018-1-22 07:18:27.918 1 data 0100040000000009620400000000000000000000000000000000000000000000
2018-1-22 07:18:28.056 1 data 0100000000000009628d00000000000000000000000000000000000000000000
2018-1-22 07:18:28.249 1 data 0100080000000009635400000000000000000000000000000000000000000000
2018-1-22 07:18:28.368 1 data 010000000000000963c300000000000000000000000000000000000000000000
2018-1-22 07:18:28.594 1 data 010010000000000964a300000000000000000000000000000000000000000000
2018-1-22 07:18:28.688 1 data 0100000000000009650500000000000000000000000000000000000000000000
2018-1-22 07:18:28.856 1 data 010020000000000965ac00000000000000000000000000000000000000000000
2018-1-22 07:18:28.952 1 data 0100000000000009660900000000000000000000000000000000000000000000
from xkeys.
Please find attached,
I did a bunch of these as separate logs so as to not forget where I was at in commenting ;)
jog full clockwise.txt
jog full counterclockwise.txt
shuttle left then centre.txt
shuttle right then centre.txt
soft key rows.txt
button on the top.txt
The jogwheel turns in 10 tactile steps to do a full rotation
The shuttle rests centre and then turns left/right in 7 steps, but these are not tacticle and you can only see them in software. It is sprung loaded to return centre.
from xkeys.
Perfect!
I've pushed some updates to the dev-branch.
If you could pull that and test if it works please?
Fingers crossed!
from xkeys.
Hiya
Seems to work great
I had to add these lines to your sample javascript in the readme that gives a human readable output
myXkeysPanel.on('shuttle', deltaPos => { console.log('Shuttle position has changed: '+deltaPos); });
Log: test.txt
Thanks very much for your help!
from xkeys.
Great! I'll push the update to npm shortly.
from xkeys.
Small comment - if I hold the shuttle in a non-neutral position, and press another key, an extra shuttle change of state (eg. from 3 to 3) is logged in the console even though no change has taken place
Shuttle position has changed: -1
Shuttle position has changed: -2
Shuttle position has changed: -3
Shuttle position has changed: -4
Shuttle position has changed: -5
Key pressed: 69
Shuttle position has changed: -5
Key released: 69
Shuttle position has changed: -5
Shuttle position has changed: -4
Shuttle position has changed: -3
Shuttle position has changed: -2
Shuttle position has changed: -1
Shuttle position has changed: 0
from xkeys.
Thanks, I've pushed a minor update to dev, could you verify that it works?
from xkeys.
I’m away from home until Sunday, I’ll check then!
from xkeys.
ping @Planks, if you have time to check it? :)
from xkeys.
Checked now, works, thanks for the reminder.
You should add the shuttle code to your demo code in the readme!
from xkeys.
good idea! I'll push this to the master branch and to a new npm version right away!
Thanks for the help!
from xkeys.
Related Issues (20)
- Support for XKE-64 JogT-bar HOT 2
- Log for XKE-128 HOT 1
- Discussion: Major updates to the library HOT 16
- XK-12 Joystick using wrong bits HOT 8
- XK-8 support HOT 15
- Feature: WebHID HOT 1
- Closing down neatly HOT 4
- Can XKeysWatcher handle existing connections? HOT 2
- Multiple devices HOT 6
- Backlight methods HOT 6
- Help with building HOT 8
- Any known problems with Raspberry Pi? HOT 2
- XKeys.listAllConnectedPanels is not a function HOT 9
- How to dispose of an xkeysPanel? HOT 10
- call a xkeys function out of the watcher HOT 4
- UnhandledPromiseRejectionWarning when watcher fails to open device HOT 1
- npm packages have a lot of 'junk' files HOT 1
- XK-24 EEPROM retaining code? HOT 2
- yarn build-record-test doesn't work in root of repo
- Intermittent "NotAllowedError: Failed to write the report." on Chrome v115+ HOT 6
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 xkeys.