Nayel
DIIDevHeads IoT Integration Server
•Created by melta101 on 7/31/2024 in #middleware-and-os
How to convert relative cursor movement to absolute position for BLE HID using Zephyr?
In this example, update_cursor_position takes relative movement as input and updates the absolute position, while set_cursor_position allows you to set the absolute position directly.
Handling phone compatibility:
If your phone isn't recognizing the device with absolute positioning, you might need to add a physical (x, y) min/max to your descriptor:
Add these lines just before the Logical Minimum and Maximum in your descriptor.
Calibration:
You'll need to implement a calibration process to map the phone's screen dimensions to your 0-32767 range. This could involve having the user touch specific points on the screen and adjusting your coordinates accordingly.
15 replies