Page 1 of 1

d-pad bad inputs

Posted: Thu 13 Feb 2020 10:34
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

Re: d-pad bad inputs

Posted: Fri 14 Feb 2020 07:42
by Sakib
Hi Did you configure your input, I suggest you to create a ticket in website with your problem details...

Re: d-pad bad inputs

Posted: Fri 14 Feb 2020 12:12
by p3t3rlustig
no, everything controls are on default, i didnt changed anything.
i will try to make a video of the phenomenon

Re: d-pad bad inputs

Posted: Fri 14 Feb 2020 13:51
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?

Re: d-pad bad inputs

Posted: Fri 14 Feb 2020 17:53
by p3t3rlustig
surprisingly it works way better after configuring inputs.
is there any way to configure the dead zone of the d-pad?

Re: d-pad bad inputs

Posted: Fri 14 Feb 2020 21:00
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.

Re: d-pad bad inputs

Posted: Fri 21 Feb 2020 11:33
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.