소스 검색

Update 'CARDPUTER CircuitPython/projects/udp_socket_chat/code.py'

cube 1 개월 전
부모
커밋
c32b562c9d
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8
    0
      CARDPUTER CircuitPython/projects/udp_socket_chat/code.py

+ 8
- 0
CARDPUTER CircuitPython/projects/udp_socket_chat/code.py 파일 보기

@@ -68,6 +68,14 @@ async def socket_recv():
68 68
                     con_msg = ">> " + conn_client + " <<"
69 69
                     messages_list.append([con_msg, color])
70 70
                     update_gui()
71
+
72
+                elif header == "messagelog":
73
+                    msg = a["message"]
74
+                    color = 0x89a0a8
75
+                    messages_list.append([msg, color])
76
+                    update_gui()
77
+
78
+
71 79
             except Exception as e:
72 80
                 error_msg = str(e) + " (buffer size?)"
73 81
                 color = 0xff0000