7 May 2018, 12:18

@voljega

Heu faire des logs... tu m'en demandes beaucoup là ^^

Les 2 types d'appui fonctionnent, j'ai repris le code original du rpi-pin356-power + petite modif de @supernature2k pour le ONOFF 😉
Celui-ci fonctionne très bien d'ailleurs.

Sur celui que j'ai modifié, il suffit que je mette en commentaire les lignes ci-dessous pour que le reset court fasse un reboot proprement :

			elif (timer >1):

#				if search_launcher(channel) == True:
#					nwcommand="RESET"
#					retroarch(nwcommand)
#					print "retroarch"
#					killthats**t(channel)
#				elif search_launcher(channel) == False:	
					speed=0.05
					shutdownstring="shutdown -r now"
					offreset(speed, shutdownstring)
					print "reboot"
			timer = 0
			flag = False
		time.sleep(0.1)

Donc il y a bien un truc qui cloche ici :

				if search_launcher(channel) == True:
					nwcommand="RESET"
					retroarch(nwcommand)
					print "retroarch"
					killthats**t(channel)
				elif search_launcher(channel) == False:

ou là: (pour info j'ai bien ajouté import subprocess)

def search_launcher(channel):
	if channel == RESETPLUS:
		proce=subprocess.Popen('ps -ef | grep emulatorlauncher', stdout=subprocess.PIPE)
		tmp=proce.stdout.read()
		if tmp:
			return True
		else:
			return False