code/ext_ui_methods_lib.py
def loop():
	""" actions that need to be executed every loop (independently from prog_pos) are here.
		this function will be called before any other actions in the main loop
	"""
	io.keyboard_input()		# keyboard input
	io.update_input()		# button input

	# debug information about input and output
	if gl.show_debug:
		if not gl.prog_pos == 'i':
			i_s = "O: "
			for i in io.valves_state:
				i_s += str(int(i)) + "; "
			i_s += str(int(io.pump_state))
			gl.debug_text.append(i_s)
			i_s = "I: up: " + str(int(io.read_input(io.UP))) + "; down: " + str(int(io.read_input(io.DOWN))) + "; left: " + str(int(io.read_input(io.LEFT))) + "; right: " + str(int(io.read_input(io.RIGHT))) + ";"
			gl.debug_text.append(i_s)
			i_s = "I: next: " + str(int(io.read_input(io.NEXT))) + "; back: " + str(int(io.read_input(io.BACK)))
			gl.debug_text.append(i_s)
 actions that need to be executed every loop (independently from prog_pos) are here.
		this function will be called before any other actions in the main loop
	
actions that need to be executed every loop (independently from prog_pos) are here.
this function will be called before any other actions in the main loop
actions that need to be executed every loop ( independently from prog_pos ) are here . this function will be called before any other actions in the main loop
def loop():
	io.keyboard_input()		
	io.update_input()		
	if gl.show_debug:
		if not gl.prog_pos == 'i':
			i_s = "O: "
			for i in io.valves_state:
				i_s += str(int(i)) + "; "
			i_s += str(int(io.pump_state))
			gl.debug_text.append(i_s)
			i_s = "I: up: " + str(int(io.read_input(io.UP))) + "; down: " + str(int(io.read_input(io.DOWN))) + "; left: " + str(int(io.read_input(io.LEFT))) + "; right: " + str(int(io.read_input(io.RIGHT))) + ";"
			gl.debug_text.append(i_s)
			i_s = "I: next: " + str(int(io.read_input(io.NEXT))) + "; back: " + str(int(io.read_input(io.BACK)))
			gl.debug_text.append(i_s)
def loop ( ) : io . keyboard_input ( ) io . update_input ( ) if gl . show_debug : if not gl . prog_pos == 'i' : i_s = "O: " for i in io . valves_state : i_s += str ( int ( i ) ) + "; " i_s += str ( int ( io . pump_state ) ) gl . debug_text . append ( i_s ) i_s = "I: up: " + str ( int ( io . read_input ( io . UP ) ) ) + "; down: " + str ( int ( io . read_input ( io . DOWN ) ) ) + "; left: " + str ( int ( io . read_input ( io . LEFT ) ) ) + "; right: " + str ( int ( io . read_input ( io . RIGHT ) ) ) + ";" gl . debug_text . append ( i_s ) i_s = "I: next: " + str ( int ( io . read_input ( io . NEXT ) ) ) + "; back: " + str ( int ( io . read_input ( io . BACK ) ) ) gl . debug_text . append ( i_s )
actions that need to be executed every loop (independently from prog_pos) are here.
actions that need to be executed every loop ( independently from prog_pos ) are here .
""" actions that need to be executed every loop (independently from prog_pos) are here.
		this function will be called before any other actions in the main loop
	""" # keyboard input # button input # debug information about input and output