thanhlev / keyboard_mouse_emulate_on_raspberry

Bluetooth Keyboard Mouse Emulator on Raspberry Pi
https://thanhlev.github.io/
MIT License
297 stars 103 forks source link

Integer to signed 8-bit f #12

Closed IamBeardo closed 4 years ago

IamBeardo commented 4 years ago
min(127, max(-127, int(self.x * speed))) & 255

the lower boundary should be -128.

min(127, max(-128, int(self.x * speed))) & 255

I got my own code working thanks to your last update - good inspiration, thanks!