mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-05 13:50:14 +00:00
Merge branch 'master' of github.com:markqvist/Reticulum
This commit is contained in:
commit
ce974db084
@ -250,6 +250,7 @@ class RNodeMultiInterface(Interface):
|
|||||||
if (not self.validcfg):
|
if (not self.validcfg):
|
||||||
raise ValueError("The configuration for "+str(self)+" contains errors, interface is offline")
|
raise ValueError("The configuration for "+str(self)+" contains errors, interface is offline")
|
||||||
|
|
||||||
|
def start(self):
|
||||||
try:
|
try:
|
||||||
self.open_port()
|
self.open_port()
|
||||||
|
|
||||||
@ -324,8 +325,8 @@ class RNodeMultiInterface(Interface):
|
|||||||
lt_alock=subint[9]
|
lt_alock=subint[9]
|
||||||
)
|
)
|
||||||
|
|
||||||
interface.OUT = self.OUT
|
interface.OUT = subint[10]
|
||||||
interface.IN = self.IN
|
interface.IN = True
|
||||||
|
|
||||||
interface.announce_rate_target = self.announce_rate_target
|
interface.announce_rate_target = self.announce_rate_target
|
||||||
interface.mode = self.mode
|
interface.mode = self.mode
|
||||||
@ -1007,6 +1008,11 @@ class RNodeSubInterface(Interface):
|
|||||||
self.parent_interface = parent_interface
|
self.parent_interface = parent_interface
|
||||||
self.announce_rate_target = None
|
self.announce_rate_target = None
|
||||||
|
|
||||||
|
self.mode = None
|
||||||
|
self.announce_cap = None
|
||||||
|
self.bitrate = None
|
||||||
|
self.ifac_size = None
|
||||||
|
|
||||||
# add this interface to the subinterfaces array
|
# add this interface to the subinterfaces array
|
||||||
self.parent_interface.subinterfaces[index] = self
|
self.parent_interface.subinterfaces[index] = self
|
||||||
|
|
||||||
|
@ -991,7 +991,7 @@ class Reticulum:
|
|||||||
enabled_count += 1
|
enabled_count += 1
|
||||||
|
|
||||||
# Create an array with a row for each subinterface
|
# Create an array with a row for each subinterface
|
||||||
subint_config = [[0 for x in range(10)] for y in range(enabled_count)]
|
subint_config = [[0 for x in range(11)] for y in range(enabled_count)]
|
||||||
subint_index = 0
|
subint_index = 0
|
||||||
|
|
||||||
for subinterface in c:
|
for subinterface in c:
|
||||||
@ -1020,6 +1020,11 @@ class Reticulum:
|
|||||||
subint_config[subint_index][8] = st_alock
|
subint_config[subint_index][8] = st_alock
|
||||||
lt_alock = float(subinterface_config["airtime_limit_long"]) if "airtime_limit_long" in subinterface_config else None
|
lt_alock = float(subinterface_config["airtime_limit_long"]) if "airtime_limit_long" in subinterface_config else None
|
||||||
subint_config[subint_index][9] = lt_alock
|
subint_config[subint_index][9] = lt_alock
|
||||||
|
|
||||||
|
if "outgoing" in subinterface_config and subinterface_config.as_bool("outgoing") == False:
|
||||||
|
subint_config[subint_index][10] = False
|
||||||
|
else:
|
||||||
|
subint_config[subint_index][10] = True
|
||||||
subint_index += 1
|
subint_index += 1
|
||||||
|
|
||||||
# if no subinterfaces are defined
|
# if no subinterfaces are defined
|
||||||
@ -1045,10 +1050,8 @@ class Reticulum:
|
|||||||
id_callsign = id_callsign
|
id_callsign = id_callsign
|
||||||
)
|
)
|
||||||
|
|
||||||
if "outgoing" in c and c.as_bool("outgoing") == False:
|
interface.IN = False
|
||||||
interface.OUT = False
|
interface.OUT = False
|
||||||
else:
|
|
||||||
interface.OUT = True
|
|
||||||
|
|
||||||
interface.mode = interface_mode
|
interface.mode = interface_mode
|
||||||
|
|
||||||
@ -1099,6 +1102,9 @@ class Reticulum:
|
|||||||
|
|
||||||
RNS.Transport.interfaces.append(interface)
|
RNS.Transport.interfaces.append(interface)
|
||||||
|
|
||||||
|
if isinstance(interface, RNS.Interfaces.RNodeMultiInterface.RNodeMultiInterface):
|
||||||
|
interface.start()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
RNS.log("Skipping disabled interface \""+name+"\"", RNS.LOG_DEBUG)
|
RNS.log("Skipping disabled interface \""+name+"\"", RNS.LOG_DEBUG)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user