Re: Closing ts_calibrate once started from java

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 24.04.2019 22:11 schrieb Joshua Linsky:
Martin,

I tried to send this email to tslib@xxxxxxxxxxxxxxxxxxx but got:

The following organization rejected your message:
bombadil.infradead.org. (2607:7c80:54:e::133, the server for the
domain lists.infradead.org.).

Please see message below:

FROM: Joshua Linsky
 SENT: Wednesday, April 24, 2019 12:59 PM
 TO: 'tslib@xxxxxxxxxxxxxxxxxxx'
 SUBJECT: Closing ts_calibrate once started from java

Hello,

I am working on a project that uses a touchscreen along with the tslib
library . We call ts_calibrate from java via the command:

Process externalProcess = Runtime.getRuntime().exec("/bin/sh -c
timeout 15000 ts_calibrate");

The user is supposed to then go through the normal calibration process
(touch the 4 corners as they show up then the middle) and the process
closes without any problems and returns back to the main java frame.

I have a switch connected to the processor board that is being read
serially by java. When the switch is flipped it should switch to
"non-touchscreen mode", indicating a regular screen is connected,
instead of a touchscreen.

I have no problem reading the switch but I am trying to kill the
ts_calibrate process when the switch is flipped but no commands I have
tried are actually able to kill it successfully. It always stays up
and I can't figure out what I am doing wrong.

I have tried:

externalProcess.destroy();

Runtime.getRuntime().exec("kill -9 $(pidof ts_calibrate)");

Runtime.getRuntime().exec("pkill ts_calibrate");


kill (or killall) should work just fine. Nothing fancy is going on here. Check the
return values. What may happen of course, is that the framebuffer is not
being cleared when ts_calibrate is killed. You'll see ts_calibrate despide it's
not running anymore. Is that the case?

that said, ts_calibrate shouldn't actually start when no touchscreen device
is connected... what devices does it open for you then?

thanks

                                           martin


_______________________________________________
tslib mailing list
tslib@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/tslib



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux