Einzelnen Beitrag anzeigen
  #6093  
Alt 25.05.2024, 11:41
Tibono Tibono ist offline
Resurrection
 
Registriert seit: 22.05.2018
Ort: Frankreich
Alter: 63
Land:
Beiträge: 585
Abgegebene Danke: 3.394
Erhielt 1.389 Danke für 466 Beiträge
Aktivitäten Langlebigkeit
6/20 7/20
Heute Beiträge
0/3 ssssss585
AW: Mess Emulator für diverse Schachcomputer ist fertig!

Hi Alex,
this is a timing issue depending on your host hardware and workload.
When checked, the Sensor Chess king's LED is lightened for a while and the emulation has to wait long enough before getting the actual played from-square.
Suggest to increase the emu.wait command in schess lua file (1.5 secs instead of 1 should be enough):
Code:
function interface.is_selected(x, y)
	if (machine:outputs():get_value((x - 1) .. "." .. (y - 1)) ~= 0) then
		if (math.abs(get_piece_id(x, y)) == 1) then
			emu.wait(1.5)
			return machine:outputs():get_value((x - 1) .. "." .. (y - 1)) ~= 0
		end
		return true
	end
	return false
end
Hope this helps,
Eric
Mit Zitat antworten
Folgende 6 Benutzer sagen Danke zu Tibono für den nützlichen Beitrag:
AlexS (25.05.2024), fhub (25.05.2024), kamoj (25.05.2024), Mark 1 (25.05.2024), spacious_mind (25.05.2024), Techtueftel (25.05.2024)