big K arrived

This commit is contained in:
mantis 2023-09-11 16:51:31 +02:00
parent d30d182d3e
commit 2bf59b16ba

View file

@ -49,7 +49,7 @@ def print_letter(ch):
for x in range(0,ch[0]):
for y in range(0,5):
if ch[1][y][x]=='1':
ft.set(x,y,white)
pset(x,y,255,255,255)
def print_letter_debug(ch):
print("Debug letter print")
@ -78,17 +78,35 @@ def clear_render_buffer(r,g,b):
render_buffer[3+x3+y*res3]=0
render_buffer[4+x3+y*res3]=255
def pset(x,y,r,g,b):
global render_buffer
x3 = x*3
res3 = DISPLAY_RES_X*3
render_buffer[2+x3+y*res3]=r
render_buffer[3+x3+y*res3]=g
render_buffer[4+x3+y*res3]=b
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
def flush_render():
global sock
sock.sendto(render_buffer, (FLASZKI_UDP_IP, FLASZKI_UDP_PORT))
def close_sock():
global sock
sock.sendto(bytearray([HEADER_DRGB, HEADER_TIME_WAIT]), (FLASZKI_UDP_IP, FLASZKI_UDP_PORT))
def render_stub():
global render_buffer
prepare_render_buffer(255,0,0)
clear_render_buffer(0,0,255)
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.sendto(render_buffer, (FLASZKI_UDP_IP, FLASZKI_UDP_PORT))
print_letter(letter_k)
flush_render()
time.sleep(3)
sock.sendto(bytearray([HEADER_DRGB,HEADER_TIME_WAIT]), (FLASZKI_UDP_IP, FLASZKI_UDP_PORT))
close_sock()
def get_text_vline(st, i):
done=False