d4rken / myolib

Android Myo library with full data access and support for multiple Myos.
Apache License 2.0
38 stars 19 forks source link

emgdata convertion from byte to integer #4

Closed AgentEpsilon5 closed 9 years ago

AgentEpsilon5 commented 9 years ago

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. :smiley:

d4rken commented 9 years ago

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 commented 9 years ago

Fixed in #5, will update build as 0.0.3