d-pad bad inputs

Please check here for help solving common issues.
Post Reply
p3t3rlustig
Posts: 5
Joined: Thu 13 Feb 2020 10:17

d-pad bad inputs

Post by p3t3rlustig »

when i play tetris and e.g. press down on the d-pad, i get ghosts inputs to the right.
it also happens on the retrorangepi menu, when i am inside a menu and i am scrolling down, it switches to another menu
Sakib
Posts: 128
Joined: Wed 19 Dec 2018 14:43

Re: d-pad bad inputs

Post by Sakib »

Hi Did you configure your input, I suggest you to create a ticket in website with your problem details...
p3t3rlustig
Posts: 5
Joined: Thu 13 Feb 2020 10:17

Re: d-pad bad inputs

Post by p3t3rlustig »

no, everything controls are on default, i didnt changed anything.
i will try to make a video of the phenomenon
User avatar
Admin
Administrateur du site
Posts: 505
Joined: Sat 10 Dec 2016 13:12

Re: d-pad bad inputs

Post by Admin »

This is most likely a software issue.
Please try to reconfigure the inputs by pressing "start" "configure input"
(when you're out of buttons you need to hold A to skip buttons)

Can you tell if this solved your issue?
It's always down and right which are pressed together when you press down?
p3t3rlustig
Posts: 5
Joined: Thu 13 Feb 2020 10:17

Re: d-pad bad inputs

Post by p3t3rlustig »

surprisingly it works way better after configuring inputs.
is there any way to configure the dead zone of the d-pad?
Mayday10
Posts: 15
Joined: Thu 30 Aug 2018 02:17

Re: d-pad bad inputs

Post by Mayday10 »

I believe there was an issue with the retrorangepi that after pressing select, there was d-pad issues and configuring the inputs was necessary. Not sure if the latest update fixed that or not.
User avatar
Admin
Administrateur du site
Posts: 505
Joined: Sat 10 Dec 2016 13:12

Re: d-pad bad inputs

Post by Admin »

There isn't dead zone for the Dpad, it's 4 GPIO buttons.

I think this problem might be because of the joystick driver. As you don't have joystick part, the values are floating and may vary. So maybe sometimes the joystick is registered as up or down.

You can check the gamepad driver in : home/pi/retropie/retropiemenu/retrorangepi/gpio/drivers/tz_gpiocontroller.py (or something like this)

At the end of the file there is the part for the joystick. Can you check if this part is commented out? (lines are commented if they start by #)

Code: Select all

#joystick =====================

	f3scale=open("/sys/bus/iio/devices/iio:device0/in_voltage3_scale", "r")
	f4scale=open("/sys/bus/iio/devices/iio:device0/in_voltage4_scale", "r")
	f3raw=open("/sys/bus/iio/devices/iio:device0/in_voltage3_raw", "r")
	f4raw=open("/sys/bus/iio/devices/iio:device0/in_voltage4_raw", "r")
	
	joystick_LR = int(int(f3raw.read())*float(f3scale.read()))
	joystick_UD = int(int(f4raw.read())*float(f4scale.read()))

	
	if (joystick_LR > (VREF/2 + DZONE)) or (joystick_LR < (VREF/2 - DZONE)):
		if (joystick_LR > VREF):
			if (joystick_LR < JOYOFFVAL):
				gamepad.emit(uinput.ABS_X, 0 ) 
		else: 
			gamepad.emit(uinput.ABS_X, VREF - joystick_LR ) 
	else:#Center the sticks if within deadzone
		gamepad.emit(uinput.ABS_X, VREF/2)
		
	if (joystick_UD > (VREF/2 + DZONE)) or (joystick_UD < (VREF/2 - DZONE)):
		if (joystick_UD > VREF):
			if (joystick_UD < JOYOFFVAL):
				gamepad.emit(uinput.ABS_Y, VREF ) 
		else: 
			gamepad.emit(uinput.ABS_Y, joystick_UD )
	else:#Center the sticks if within deadzone
		gamepad.emit(uinput.ABS_Y, VREF/2)
	
	
	
	f3raw.close()
	f4raw.close()
	f3scale.close()
	f4scale.close()
Retrorangepi disabled the joystick part for now in the driver so depending on your version of retrorangepi you might have or not those lines commented. If they are not commented, you can try removing them or comment them all.
Post Reply