Fixed incorrect defaults for IFAC size after increase in default values in RNS

This commit is contained in:
Mark Qvist 2023-12-05 20:37:05 +01:00
parent 7e5948403b
commit 3b7d1b7892
3 changed files with 288 additions and 259 deletions

View File

@ -2810,6 +2810,11 @@ class SidebandCore():
else:
ifac_netkey = self.config["connect_tcp_ifac_passphrase"]
if ifac_netname != None or ifac_netkey != None:
ifac_size = 16
else:
ifac_size = None
tcpinterface = RNS.Interfaces.TCPInterface.TCPClientInterface(
RNS.Transport,
"TCPClientInterface",
@ -2834,7 +2839,7 @@ class SidebandCore():
else:
if_mode = None
self.reticulum._add_interface(tcpinterface, mode=if_mode, ifac_netname=ifac_netname, ifac_netkey=ifac_netkey)
self.reticulum._add_interface(tcpinterface, mode=if_mode, ifac_netname=ifac_netname, ifac_netkey=ifac_netkey, ifac_size=ifac_size)
self.interface_tcp = tcpinterface
except Exception as e:
@ -2857,6 +2862,11 @@ class SidebandCore():
else:
ifac_netkey = self.config["connect_i2p_ifac_passphrase"]
if ifac_netname != None or ifac_netkey != None:
ifac_size = 16
else:
ifac_size = None
i2pinterface = RNS.Interfaces.I2PInterface.I2PInterface(
RNS.Transport,
"I2PInterface",
@ -2880,7 +2890,7 @@ class SidebandCore():
else:
if_mode = None
self.reticulum._add_interface(i2pinterface, mode = if_mode, ifac_netname=ifac_netname, ifac_netkey=ifac_netkey)
self.reticulum._add_interface(i2pinterface, mode = if_mode, ifac_netname=ifac_netname, ifac_netkey=ifac_netkey, ifac_size=ifac_size)
for si in RNS.Transport.interfaces:
if type(si) == RNS.Interfaces.I2PInterface.I2PInterfacePeer:

View File

@ -290,6 +290,20 @@ def shared_radio_horizon(c1, c2,):
"antenna_distance": antenna_distance
}
def ghtest():
import pygeodesy
from pygeodesy.ellipsoidalKarney import LatLon
ginterpolator = pygeodesy.GeoidKarney("./assets/geoids/egm2008-5.pgm")
# Make an example location
lat=51.416422
lon=-116.217151
# Get the geoid height
single_position=LatLon(lat, lon)
h = ginterpolator(single_position)
print(h)
# def tests():
# import RNS
# import numpy as np

View File

@ -282,6 +282,7 @@ class RVDetails(MDRecycleView):
self.data = []
def update_source(self, rendered_telemetry=None):
try:
if not rendered_telemetry:
rendered_telemetry = []
@ -555,7 +556,11 @@ class RVDetails(MDRecycleView):
self.entries.append({"icon": "timeline-question-outline", "text": f"No telemetry available for this device"})
self.data = self.entries
except Exception as e:
import traceback
exception_info = "".join(traceback.TracebackException.from_exception(e).format())
RNS.log(f"An {str(type(e))} occurred while updating service telemetry: {str(e)}", RNS.LOG_ERROR)
RNS.log(exception_info, RNS.LOG_ERROR)
layout_object_details = """