summaryrefslogtreecommitdiffhomepage
path: root/main.py
diff options
context:
space:
mode:
authorPrivate Island Networks Inc <opensource@privateisland.tech>2026-04-15 10:03:42 -0400
committerPrivate Island Networks Inc <opensource@privateisland.tech>2026-04-15 10:03:42 -0400
commit926e5b9cb55045ddb5298937d29eb5e739bdf168 (patch)
tree27ab19387b14e5cb3afb73fe9475ad2757c22c64 /main.py
parent18f975563c763d547578d848a220e37ea39724f0 (diff)
main: use hex for controller UI
Diffstat (limited to 'main.py')
-rwxr-xr-xmain.py10
1 files 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))

Highly Recommended Verilog Books