mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 10:04:33 +02:00
and some more networkrelated tests
This commit is contained in:
parent
1343d6e7ea
commit
5a5d7ac55d
|
@ -777,8 +777,8 @@ class ThreadedTCPRequestHandler(socketserver.StreamRequestHandler):
|
||||||
for _, route in enumerate(MeshParam.routing_table):
|
for _, route in enumerate(MeshParam.routing_table):
|
||||||
output["routes"].append(
|
output["routes"].append(
|
||||||
{
|
{
|
||||||
"dxcall": MeshParam.routing_table[_][0].decode('utf-8'),
|
"dxcall": MeshParam.routing_table[_][0],
|
||||||
"router": MeshParam.routing_table[_][1].decode('utf-8'),
|
"router": MeshParam.routing_table[_][1],
|
||||||
"hops": MeshParam.routing_table[_][2],
|
"hops": MeshParam.routing_table[_][2],
|
||||||
"snr": MeshParam.routing_table[_][3],
|
"snr": MeshParam.routing_table[_][3],
|
||||||
"score": MeshParam.routing_table[_][4],
|
"score": MeshParam.routing_table[_][4],
|
||||||
|
@ -1152,8 +1152,8 @@ def send_tnc_state():
|
||||||
for _, route in enumerate(MeshParam.routing_table):
|
for _, route in enumerate(MeshParam.routing_table):
|
||||||
output["routing_table"].append(
|
output["routing_table"].append(
|
||||||
{
|
{
|
||||||
"dxcall": MeshParam.routing_table[_][0].decode('utf-8'),
|
"dxcall": MeshParam.routing_table[_][0],
|
||||||
"router": MeshParam.routing_table[_][1].decode('utf-8'),
|
"router": MeshParam.routing_table[_][1],
|
||||||
"hops": MeshParam.routing_table[_][2],
|
"hops": MeshParam.routing_table[_][2],
|
||||||
"snr": MeshParam.routing_table[_][3],
|
"snr": MeshParam.routing_table[_][3],
|
||||||
"score": MeshParam.routing_table[_][4],
|
"score": MeshParam.routing_table[_][4],
|
||||||
|
|
|
@ -128,7 +128,7 @@ class TCIParam:
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class TNC:
|
class TNC:
|
||||||
version = "0.10.0-alpha.1-mesh-exp4"
|
version = "0.10.0-alpha.1-mesh-exp5"
|
||||||
host: str = "0.0.0.0"
|
host: str = "0.0.0.0"
|
||||||
port: int = 3000
|
port: int = 3000
|
||||||
SOCKET_TIMEOUT: int = 1 # seconds
|
SOCKET_TIMEOUT: int = 1 # seconds
|
||||||
|
|
|
@ -29,7 +29,7 @@ def main_menu():
|
||||||
while True:
|
while True:
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
title = 'Please select a command you want to run: '
|
title = 'Please select a command you want to run: '
|
||||||
options = ['BEACON', 'PING', 'ARQ', 'LIST AUDIO DEVICES']
|
options = ['BEACON', 'PING', 'ARQ', 'LIST AUDIO DEVICES','LIST ROUTING TABLE']
|
||||||
option, index = pick(options, title)
|
option, index = pick(options, title)
|
||||||
|
|
||||||
# BEACON AREA
|
# BEACON AREA
|
||||||
|
@ -87,6 +87,10 @@ def main_menu():
|
||||||
|
|
||||||
option, index = pick(device_list, "Audio devices")
|
option, index = pick(device_list, "Audio devices")
|
||||||
|
|
||||||
|
elif option == 'LIST ROUTING TABLE':
|
||||||
|
run_network_command({"type": "get", "command": "routing_table"})
|
||||||
|
|
||||||
|
|
||||||
if option == '----- BACK -----':
|
if option == '----- BACK -----':
|
||||||
main_menu()
|
main_menu()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue