mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-04 07:34:51 -04:00
Internal interface config handling for PipeInterface
This commit is contained in:
parent
ebf084cff0
commit
25127cd3c9
2 changed files with 14 additions and 30 deletions
|
@ -619,33 +619,8 @@ class Reticulum:
|
|||
interface_post_init(interface)
|
||||
|
||||
if c["type"] == "PipeInterface":
|
||||
command = c["command"] if "command" in c else None
|
||||
respawn_delay = c.as_float("respawn_delay") if "respawn_delay" in c else None
|
||||
|
||||
if command == None:
|
||||
raise ValueError("No command specified for PipeInterface")
|
||||
|
||||
interface = PipeInterface.PipeInterface(
|
||||
RNS.Transport,
|
||||
name,
|
||||
command,
|
||||
respawn_delay,
|
||||
)
|
||||
|
||||
if "outgoing" in c and c.as_bool("outgoing") == False:
|
||||
interface.OUT = False
|
||||
else:
|
||||
interface.OUT = True
|
||||
|
||||
interface.mode = interface_mode
|
||||
|
||||
interface.announce_cap = announce_cap
|
||||
if configured_bitrate:
|
||||
interface.bitrate = configured_bitrate
|
||||
if ifac_size != None:
|
||||
interface.ifac_size = ifac_size
|
||||
else:
|
||||
interface.ifac_size = 8
|
||||
interface = PipeInterface.PipeInterface(RNS.Transport, interface_config)
|
||||
interface_post_init(interface)
|
||||
|
||||
if c["type"] == "KISSInterface":
|
||||
preamble = int(c["preamble"]) if "preamble" in c else None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue