Jump to content

Button cannot be released


Tomasz

Recommended Posts

Hi,

I'm using Linux event driver for my 5 inch touch screen and I've noticed strange behavior. Button remains in "pressed" state after the finger has been lifted. Looks like the release event hasn't be recognized or missed for some reason. It happens from time to time but actually quite frequently. I've been trying to adjust GMOUSE_LINUX_EVENT_FINGER_CLICK_ERROR and GMOUSE_LINUX_EVENT_FINGER_MOVE_ERROR values in "gmouse_lld_linux_event_board.h" file based on the results from "touch driver test" demo but without success. Would be great if somebody could give me a hint how to resolve this issue.

Thanks in advance,

Tomasz

 

Link to comment
Share on other sites

I don't currently have any setup available that least me easily test the Linux event driver. However, I used it myself in the past without any problems.

I'd recommend you to setup a project that allows you compiling on a Linux machine with a desktop environment using the SDL2 port for easy debugging. Step through the code to figure out where it's going wrong.

Link to comment
Share on other sites

I've been trying to debug the code using GDB and Eclipse. I've noticed that when the button hangs in "pressed" state GetMouseReading functions gets z=1 instead of z=0. please see my Breakpoint in Step2:

static void GetMouseReading(GMouse *m) {
	GMouseReading	r;

	// Step 1 - Get the Raw Reading
	{
		m->flags &= ~GMOUSE_FLG_NEEDREAD;
		if (!gmvmt(m)->get(m, &r))
			return;
	}

	// Step 2 - Handle touch and button 0 debouncing
	{
		// Clean off button garbage
		r.buttons &= GINPUT_MOUSE_BTN_MASK;

and code seems to be stuck in sem_wait() function:

      err = lll_futex_wait (&isem->value, 0,isem->private ^ FUTEX_PRIVATE_FLAG);

I'm not sure if this information is relevant but  I've stuck now and don't know how to find the root cause of this issue.

Thanks,

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...