Skip to content

Commit

Permalink
some tests
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Velickovic <[email protected]>
  • Loading branch information
Ivan-Velickovic committed Sep 27, 2024
1 parent b15e3ad commit c4c2e01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions examples/kitty/client/kitty.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,10 @@ async def read_from_server():
# Printing "-$1" if there has been a purchase
if words[0] == '200':
display.rect(0, 500, 2000, 2000, 0x0, True)
wri50.set_textpos(display, 500, (TRUE_DISPLAY_WIDTH - wri50.stringlen(f'-$1'))//2)
charged_str = "Charged $1"
wri50.set_textpos(display, 500, (TRUE_DISPLAY_WIDTH - wri50.stringlen(charged_str))//2)

wri50.printstring(f"-$1")
wri50.printstring(charged_str)

display.show()

Expand Down
2 changes: 1 addition & 1 deletion examples/kitty/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def handle_connection(conn: socket.socket, uber: socket.socket) -> None:
balance -= 1
conn.sendall("200 Thanks {} Credit: ${:.2f}\n".format(card_id, balance).encode())
elif resp == "new":
conn.sendall("400 New card, quote {} to the kitty admins\n".format(card_id % 1000).encode())
conn.sendall("400 New card, quote {} to the Kitty admins\n".format(card_id % 1000).encode())
else:
conn.sendall(resp.encode())

Expand Down

0 comments on commit c4c2e01

Please sign in to comment.