Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

emgdata convertion from byte to integer #4

Closed
AgentEpsilon5 opened this issue Sep 4, 2015 · 2 comments
Closed

emgdata convertion from byte to integer #4

AgentEpsilon5 opened this issue Sep 4, 2015 · 2 comments

Comments

@AgentEpsilon5
Copy link

According to code, https://github.com/d4rken/myolib/blob/master/myolib/src/main/java/eu/darken/myolib/processor/emg/EmgProcessor.java

When EMG data received from DataPacket,
the code in the line 30 and 35 (something like "packet.getData()[i] & 0xFF;") converts the signed data to unsigned int.

I think passing the EMG data as byte array is better since jave has byte as only signed one. 😃

@d4rken
Copy link
Owner

d4rken commented Sep 4, 2015

Hm i agree.
The specifications also mention the data coming in as int8_t, not uint8_t as the other sensor data.
My mistake. Thanks for pointing it out!

@d4rken
Copy link
Owner

d4rken commented Sep 4, 2015

Fixed in #5, will update build as 0.0.3

@d4rken d4rken closed this as completed Sep 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants