BelaPlatform / Trill

53 stars 10 forks source link

Table 12 in the datasheet appears to be incorrect #10

Open george-norton opened 2 weeks ago

george-norton commented 2 weeks ago

I have a Trill Hex rev C2 and I believe the centroid data report structure is different from the datasheet. The datasheet includes this table: image But I believe my sensor is actually reporting:

uint16_t vertical_location[4];
uint16_t vertical_size[4];
uint16_t horizontal_location[4];
uint16_t horizontal_size[4];
giuliomoro commented 2 weeks ago

But I believe my sensor is actually reporting:

You are right. Keep in mind those uint16_t are big endian so if you are trying to map a struct to that it may or may not work depending on your architecture.

george-norton commented 2 weeks ago

Yes, I am handling the byte swapping. I have a proof of concept functional driver.

giuliomoro commented 2 weeks ago

Great, you can also look at the arduino and linux libraries for any further doubts

giuliomoro commented 2 weeks ago

The correct memory map has touch N location at offset 4 + N:N+1 touch N size at offset 4 + 2*numTouches + N:N+1 for 2-axis: horizontal touch N location at offset 4 + 4*numTouches + N:N+1 horizontal touch N size at offset 4 + 6*numTouches + N:N+1

numTouches = 5 for 1-axis and numTouches = 4 for 2-axis

Not sure how to best represent this in a a table.