summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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