| Posted: 08:41pm 13 Apr 2025 |
|
|
|
Well, external Touchscreen was working "sort of", because it delivers absolute, not relative x/y-Position, as a Mouse does, additionally in a 12 Bit format, not signed 8 Bit.
Its a TSHARC Octopus Touch Controller integrated into my Screen
https://docs.rs-online.com/3b6c/0900766b807afb5e.pdf
Solved this by modifying USBKeyboard.c
nunstruct[n].L=report->buttons & MOUSE_BUTTON_LEFT ? 1 : 0; nunstruct[n].R=report->buttons & MOUSE_BUTTON_RIGHT ? 1 : 0; nunstruct[n].C=report->buttons & MOUSE_BUTTON_MIDDLE ? 1 : 0;
uint8_t *raw = (uint8_t *)report; nunstruct[n].ax = (raw[2] << 4) | (raw[1] >> 4); nunstruct[n].ay = (raw[4] << 4) | (raw[3] >> 4);
if(nunstruct[n].ax>=HRes)nunstruct[n].ax=HRes-1; if(nunstruct[n].ax<0)nunstruct[n].ax=0; if(nunstruct[n].ay>=VRes)nunstruct[n].ay=VRes-1; if(nunstruct[n].ay<0)nunstruct[n].ay=0; nunstruct[n].az+=report->wheel; if(nunstruct[n].x0!=(report->buttons & 0b111)){ nunfoundc[n]=1;
Still in 8 Bit Format and doesnt cover exactly X/Y 0->255, but thats quite enough for my task. IF's should not be neccessary, but i just leave it in there.
But overall, i think i'll move this Project to a Pi Zero, Linux, Python & Co and attach a HDMI-VGA Converter to it. The Task seems to be indeed too complex to handle it with PM alone; i have too much special needs for it. Edited 2025-04-14 11:25 by stef123 |