nanogui: Problem with touch screen
Subject:
Re: [nanogui] Problem with touch screen
From:
####@####.####
Date:
9 May 2002 09:36:20 -0000
Message-Id: <OFA44F507E.13CC64D3-ON80256BB4.00332876@diamond.philips.com>
Hi Rakesh,
You don't actually say what goes wrong, but looking at the code I guess it hangs or crashes?
> static int PD_Read(MWCOORD *px, MWCOORD *py, MWCOORD *pz, int *pb)
> {
> /* read a data point */
> short data[4];
> int bytes_read;
> EPRINTF("\n\rInside PD_READ");
>
> bytes_read = read(pd_fd, data, 4 * sizeof(data));
^^^^^^^^^^^^^^^^
I think you mean either "sizeof(data)" or "4 * sizeof(data[0])"?
>
> if (bytes_read != (4 * sizeof(data))) {
^^^^^^^^^^^^^^^^
And again.
Hope this helps.
Kind regards,
Jon Foster