-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Hi there,
The last couple of days, I've been working on a python program to control a Linux PC and/or a Raspberry with the Siri-Remote and your work has been extremely helpful, since you're basically the only one who worked on this. Thanks btw :)
So far I've got all the essential stuff working, I'm getting byte arrays for every event on the remote (buttons, touch, mic, etc..) and performing actions like volume or media control is also working. I've been looking at the data received from the touchpad for quite a while now and there's some weird things I can't figure out, so I hoped you might have some insight on that.
When I use the touchpad I receive 13 bytes (or 20 with two fingers). The first 6 bytes are just some general information like finger count, button event, etc... and the 7 bytes after that are about the finger (and again 7 bytes for the second finger).
Byte
0 finger count: 1 or 2
1 pressed buttons, else 0
2 always 50
3 ?
4 ? time (increases over time and starts again at 0)
5 ? when the finger is on the edge: 0,4,5,8,9 else 1
6 X coord, left to right: 230...255, (0,...,255)*7 ,1,...,74
7 ? (reacts to movement)
8 Y coord (signed byte), top to bottom: 38,...,1,0,255,...,188
9 ? (0 when released)
10 ? (0 when released)
11 pressure
12 ?
13-19 are like 6-12 for the second finger
The weird thing is the X coordinate: it cycles 7 times from 0 to 255 on the entire touchpad width. So the touchpad basically has >7 vertical "zones" and I didn't recognize any pattern in the other bytes that would indicate in which "zone" the finger is. Same for the second finger.
I am of course able to recognize a direction but as soon as you move a little faster horizontally, you can't know in which direction you actually moved because of the data rate limit.
Maybe I just missed something somewhere, but I'm asking here because you obviously have more experience in that field. I would appreciate it, if you can find some free time to help me out.
Another thing is the audio, I haven't gotten to that part yet because of some Linux related issues, but I saw in your other repo that the audio format is opus. Can I just strait up decode the bytes or do I need to do something first? I'm asking because I have very little knowledge in C. This question might resolve itself when I get to it but since I'm already here I might just ask that as well.