From 926e5b9cb55045ddb5298937d29eb5e739bdf168 Mon Sep 17 00:00:00 2001 From: Private Island Networks Inc Date: Wed, 15 Apr 2026 10:03:42 -0400 Subject: main: use hex for controller UI --- main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 24946dd..56db667 100755 --- a/main.py +++ b/main.py @@ -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)) -- cgit v1.2.3-8-gadcc