Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ts_read works, ts_read_mt does not #195

Open
OOHehir opened this issue Jan 23, 2022 · 1 comment
Open

ts_read works, ts_read_mt does not #195

OOHehir opened this issue Jan 23, 2022 · 1 comment

Comments

@OOHehir
Copy link

OOHehir commented Jan 23, 2022

Hello,

I'm using your library (v1.21) in conjunction with a SAMA5D4 Xplained board & a restive touchscreen.

I've run ts_calibrate & subsequently ts_read outputs:

1520602065.678729:    600    340   3443
1520602065.694748:    600    340   3387
1520602065.710742:    600    341   3297
1520602065.726734:    601    340   3235
1520602065.742740:    601    337   3193
1520602065.758743:    602    334   3121
1520602065.774743:    602    331   3063
1520602065.790742:    603    329   3028
1520602065.806742:    604    330   3003
1520602065.822741:    605    331   3015
1520602065.838731:    605    335   3064
1520602065.870743:    607    342   3177
1520602065.886727:    609    351   3220

But on running ts_test_mt I get no output. Its my understanding that ts_test_mt supports multi-touch screens but still support single touch screens. Below is the output of ts_verify:

root@sama5d4-xplained-sd:~# ts_verify
tslib 1.21 / libts ABI version 0 (0x000A03)
Release-Date: 2019-10-22

===================== test run 0 =====================
TEST ts_read_mt (blocking) 1       ......   PASS
TEST ts_read_mt (blocking) 5       ......   PASS
TEST ts_read_mt (nonblocking) 1    ......   PASS
TEST ts_read_mt (nonblocking) 5    ......   PASS
TEST ts_read    (blocking) 1       ......   PASS
TEST ts_read    (blocking) 5       ......   PASS
TEST ts_read    (nonblocking) 1    ......   PASS
TEST ts_read_raw_mt (blocking) 1   ......   PASS
TEST ts_read_raw_mt (blocking) 5   ......   PASS
TEST ts_read_raw_mt (nonblocking) 1......   PASS
TEST ts_read_raw_mt (nonblocking) 5......   PASS
TEST ts_read_raw(blocking) 1       ......   PASS
TEST ts_read_raw(blocking) 5       ......   PASS
TEST ts_read_raw(nonblocking) 1    ......   PASS
TEST ts_reconfig (1)               ......   PASS
TEST ts_load_module (4)            ......   PASS
======================================================
skip
===================== test run 1 =====================
TEST ts_read_mt (blocking) 1       ......   PASS
TEST ts_read_mt (blocking) 5       ......   PASS
TEST ts_read_mt (nonblocking) 1    ......   PASS
TEST ts_read_mt (nonblocking) 5    ......   PASS
TEST ts_read    (blocking) 1       ......   PASS
TEST ts_read    (blocking) 5       ......   PASS
TEST ts_read    (nonblocking) 1    ......   PASS
TEST ts_read_raw_mt (blocking) 1   ......   PASS
TEST ts_read_raw_mt (blocking) 5   ......   PASS
TEST ts_read_raw_mt (nonblocking) 1......   PASS
TEST ts_read_raw_mt (nonblocking) 5......   PASS
TEST ts_read_raw(blocking) 1       ......   PASS
TEST ts_read_raw(blocking) 5       ......   PASS
TEST ts_read_raw(nonblocking) 1    ......   PASS
TEST ts_reconfig (1)               ......   PASS
TEST ts_load_module (4)            ......   PASS
======================================================

ts_test_mt also works:

root@sama5d4-xplained-sd:~# ts_print_mt 
libts 000A04 opened device /dev/input/touchscreen0
sample 0 - 1520606139.568966 - (slot 0)   1435   2002   3604
sample 0 - 1520606139.584966 - (slot 0)   1458   2055   3415
sample 0 - 1520606139.600962 - (slot 0)   1483   2107   3351
sample 0 - 1520606139.616961 - (slot 0)   1508   2140   3365
sample 0 - 1520606139.632959 - (slot 0)   1555   2204   3276
sample 0 - 1520606139.648961 - (slot 0)   1605   2254   3237
sample 0 - 1520606139.664956 - (slot 0)   1660   2294   3254
sample 0 - 1520606139.680960 - (slot 0)   1712   2328   3210
sample 0 - 1520606139.696960 - (slot 0)   1765   2356   3214
sample 0 - 1520606139.712962 - (slot 0)   1814   2379   3227
sample 0 - 1520606139.728961 - (slot 0)   1856   2399   3128
sample 0 - 1520606139.744957 - (slot 0)   1894   2414   3106
sample 0 - 1520606139.760959 - (slot 0)   1923   2427   3065
sample 0 - 1520606139.776961 - (slot 0)   1945   2439   3125
sample 0 - 1520606139.792961 - (slot 0)   1961   2451   3423
sample 0 - 1520606139.804150 - (slot 0)   1969   2459   3616

Could you suggest a solution?

Regards,

@OOHehir
Copy link
Author

OOHehir commented Feb 8, 2022

with 'debug-enabled'

ts_test_mt 
tslib 1.22 / libts ABI version 0 (0x000A04)
Release-Date: 2020-07-01
 Host OS: Linux, trying to open /dev/input/touchscreen0
Loading module input
Loading module pthres (pmin=1)
Loading module dejitter (delta=100)
Loading module linear
LINEAR: Reading rotation 0 from calibfile
Linear calibration constants: 20662 132 -3934343 330 16605 -10816635 65536 
tslib input device: vendor 0x0 product 0x0 version 0x0 on bus 0x19
tslib: We have a pressure value
INPUT-RAW: read type 3  code   0  value 3141  time 1520651784.23152
INPUT-RAW: read type 3  code   1  value 2438  time 1520651784.23152
INPUT-RAW: read type 3  code  24  value 4437  time 1520651784.23152
INPUT-RAW: read type 1  code 330  value    1  time 1520651784.23152
INPUT-RAW: read type 0  code   0  value    0  time 1520651784.23152
PTHRES:   read 1 samples (mem: 1 nr x 1 slots)
DEJITTER: read 1 samples (mem: 1 nr x 1 slots)
LINEAR:   read 1 samples (mem: 1 nr x 1 slots)
BEFORE CALIB:
          (slot 0) X:3141 Y:2438 P:4437
TS_READ_MT----> slot 0: x = 935, y = 468, pressure = 4437
INPUT-RAW: read type 3  code   0  value 3162  time 1520651784.39173
INPUT-RAW: read type 3  code   1  value 2502  time 1520651784.39173
INPUT-RAW: read type 3  code  24  value 4797  time 1520651784.39173
INPUT-RAW: read type 0  code   0  value    0  time 1520651784.39173
PTHRES:   read 1 samples (mem: 1 nr x 1 slots)
DEJITTER: read 1 samples (mem: 1 nr x 1 slots)
DEJITTER----------------> 3154 2478 4662
LINEAR:   read 1 samples (mem: 1 nr x 1 slots)
BEFORE CALIB:
          (slot 0) X:3154 Y:2478 P:4662
TS_READ_MT----> slot 0: x = 939, y = 478, pressure = 4662
INPUT-RAW: read type 3  code   0  value 3010  time 1520651784.55172
INPUT-RAW: read type 3  code   1  value 2489  time 1520651784.55172
INPUT-RAW: read type 3  code  24  value 6868  time 1520651784.55172
INPUT-RAW: read type 0  code   0  value    0  time 1520651784.55172
PTHRES:   read 1 samples (mem: 1 nr x 1 slots)
DEJITTER: read 1 samples (mem: 1 nr x 1 slots)
DEJITTER: pen movement exceeds threshold
LINEAR:   read 1 samples (mem: 1 nr x 1 slots)
BEFORE CALIB:
          (slot 0) X:3010 Y:2489 P:6868
TS_READ_MT----> slot 0: x = 893, y = 480, pressure = 6868
INPUT-RAW: read type 1  code 330  value    0  time 1520651784.56447
INPUT-RAW: read type 0  code   0  value    0  time 1520651784.56447
PTHRES:   read 1 samples (mem: 1 nr x 1 slots)
DEJITTER: read 1 samples (mem: 1 nr x 1 slots)
DEJITTER----------------> 3010 2489 6868
LINEAR:   read 1 samples (mem: 1 nr x 1 slots)
BEFORE CALIB:
          (slot 0) X:3010 Y:2489 P:6868
TS_READ_MT----> slot 0: x = 893, y = 480, pressure = 6868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant