Re: Closing ts_calibrate once started from java

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

 



Martin,
I actually inadvertently figured out what was going wrong after I sent you the email yesterday.

You are right that the framebuffer was not being cleared and that's what I was seeing. I tried kill -2 and it worked perfectly. Looks like I needed to give ts_calibrate the chance to close out on its own instead of killing it with SIGKILL.

It is also true that it doesn't start when no touchscreen is plugged in.

Thanks for the quick reply and sorry about wasting your time.

Best Regards,
Joshua Linsky

-----Original Message-----
From: Martin Kepplinger [mailto:martink@xxxxxxxxx]
Sent: Thursday, April 25, 2019 1:48 AM
To: Joshua Linsky
Cc: Tslib
Subject: Re: Closing ts_calibrate once started from java

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


________________________________

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information or materials otherwise protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. This communication does not reflect an intention by the sender to conduct a transaction or make any agreement by electronic means, unless clearly so stated. The integrity and security of this message cannot be guaranteed on the Internet. Finally, the recipient should check this email and any attachments for the presence of viruses. The sender accepts no liability for any damage caused by any virus transmitted by this email.

_______________________________________________
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