bitcraze / crazyflie-android-client

The Crazyflie Nano Quadcopter client for Android OTG or BLE enabled devices
GNU General Public License v2.0
103 stars 118 forks source link

Cannot use development Crazyradio #68

Closed ataffanel closed 7 years ago

ataffanel commented 7 years ago

The code that reads the Crazyradio version assumes the hexadecimal version represents a decimal version (ie. without a-f). However we have a convention of naming the development radios 99.something and Android sign-extend the number which leads to try to convert "ff99" to an integer, this does not work.

The problem is in UsbLinkAndroid.java: https://github.com/bitcraze/crazyflie-android-client/blob/2af3e20406094a9bc4b0b88d4cbae739d584648a/src/se/bitcraze/crazyfliecontrol2/UsbLinkAndroid.java#L217. The version should be masked with 0x0ff.