jjackowski / screentouch

Makes a touchscreen act more like a touchpad to make regular desktop programs easier to use.
GNU General Public License v3.0
15 stars 5 forks source link

No touchscreen found #8

Open SvenMb opened 2 years ago

SvenMb commented 2 years ago

I have a raspberry and tested the screentouch program with two different touchscreens, but both failed with the following error:

$ bin/linux-armv6l-dbg/screentouch /dev/input/event0
Device /dev/input/event0, eGalax Inc. USB TouchController, is not a touch screen.
No touchscreen found.

and

$ bin/linux-armv6l-dbg/screentouch /dev/input/event1
Device /dev/input/event1, ADS7846 Touchscreen, is not a touch screen.
No touchscreen found.

the error seems to occur in main.cpp line 107 on evin->numSlots() < 0

I am using current debian 11 32bit with libevdev 1.11

evtest delivers:

$ evtest
No device specified, trying to scan all of /dev/input/event*
Not running as root, no devices may be available.
Available devices:
/dev/input/event0:      eGalax Inc. USB TouchController
/dev/input/event1:      ADS7846 Touchscreen
Select the device event number [0-1]: 0
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0xeef product 0x1 version 0x100
Input device name: "eGalax Inc. USB TouchController"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 330 (BTN_TOUCH)
  Event type 3 (EV_ABS)
    Event code 0 (ABS_X)
      Value   1159
      Min        0
      Max     2047
    Event code 1 (ABS_Y)
      Value    615
      Min        0
      Max     2047

thanks

jjackowski commented 2 years ago

Sorry for the late reply. Been busy with less fun stuff.

On 2022-02-25 8:09 am, SvenMb wrote:

I have a raspberry and tested the screentouch program with two different touchscreens, but both failed with the following error:

$ bin/linux-armv6l-dbg/screentouch /dev/input/event0 Device /dev/input/event0, eGalax Inc. USB TouchController, is not a touch screen. No touchscreen found.

and

$ bin/linux-armv6l-dbg/screentouch /dev/input/event1 Device /dev/input/event1, ADS7846 Touchscreen, is not a touch screen. No touchscreen found.

the error seems to occur in main.cpp line 107 on evin->numSlots() < 0

The reason for that check is so that the code can depend on multitouch protocol/type B, which tracks each contact persistently. Protocol A just provides some number of contacts, while protocol B can identify the individual contacts so each can be reliably tracked as they move. You can read more about that here: https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt

I think you might see a ABS_MT_SLOT event on the evtest output if the screen supported protocol B.

I suppose I should make the error message more clear since it does seem wrong.

Jeff