Code Monkey home page Code Monkey logo

Comments (13)

nytamin avatar nytamin commented on June 26, 2024

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.

Planks avatar Planks commented on June 26, 2024

Perfect! I will have time at some point or another to run through whatever needs done

from xkeys.

nytamin avatar nytamin commented on June 26, 2024

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.

Planks avatar Planks commented on June 26, 2024

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.

nytamin avatar nytamin commented on June 26, 2024

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.

Planks avatar Planks commented on June 26, 2024

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.

nytamin avatar nytamin commented on June 26, 2024

Great! I'll push the update to npm shortly.

from xkeys.

Planks avatar Planks commented on June 26, 2024

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.

nytamin avatar nytamin commented on June 26, 2024

Thanks, I've pushed a minor update to dev, could you verify that it works?

from xkeys.

Planks avatar Planks commented on June 26, 2024

I’m away from home until Sunday, I’ll check then!

from xkeys.

nytamin avatar nytamin commented on June 26, 2024

ping @Planks, if you have time to check it? :)

from xkeys.

Planks avatar Planks commented on June 26, 2024

Checked now, works, thanks for the reminder.

You should add the shuttle code to your demo code in the readme!

from xkeys.

nytamin avatar nytamin commented on June 26, 2024

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)

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.