diff options
| author | Private Island Networks Inc <opensource@privateisland.tech> | 2026-04-15 10:03:42 -0400 |
|---|---|---|
| committer | Private Island Networks Inc <opensource@privateisland.tech> | 2026-04-15 10:03:42 -0400 |
| commit | 926e5b9cb55045ddb5298937d29eb5e739bdf168 (patch) | |
| tree | 27ab19387b14e5cb3afb73fe9475ad2757c22c64 /main.py | |
| parent | 18f975563c763d547578d848a220e37ea39724f0 (diff) | |
main: use hex for controller UI
Diffstat (limited to 'main.py')
| -rwxr-xr-x | main.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -33,7 +33,7 @@ import platform from socket import socket, AF_INET, SOCK_DGRAM from time import sleep import json -from websockets.asyncio.server import serve +# from websockets.asyncio.server import serve from constants import * @@ -149,10 +149,10 @@ async def controller(request): data = await request.post() result = STATUS.OK q_cont = request.app['q_cont'] - await _send_msg(request.app, int(data.get('type')).to_bytes(1), - int(data.get('token')).to_bytes(1), - int(data.get('address')).to_bytes(2), - int(data.get('data')).to_bytes(4)) + await _send_msg(request.app, int(data.get('type'),16).to_bytes(1), + int(data.get('token'),16).to_bytes(1), + int(data.get('address'),16).to_bytes(2), + int(data.get('data'),16).to_bytes(4)) send_pkt = await _parse_pkt(request.app, q_cont.get(block=True)) if send_pkt['type'] == "READ": rcv_pkt = await _parse_pkt(request.app, q_cont.get(block=True)) |



