Просмотр исходного кода

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

cube 1 месяц назад
Родитель
Сommit
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
                     con_msg = ">> " + conn_client + " <<"
68
                     con_msg = ">> " + conn_client + " <<"
69
                     messages_list.append([con_msg, color])
69
                     messages_list.append([con_msg, color])
70
                     update_gui()
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
             except Exception as e:
79
             except Exception as e:
72
                 error_msg = str(e) + " (buffer size?)"
80
                 error_msg = str(e) + " (buffer size?)"
73
                 color = 0xff0000
81
                 color = 0xff0000