Added ingress control config option

This commit is contained in:
Mark Qvist 2023-09-30 21:07:22 +02:00
parent c5248d53d6
commit 52028aa44c
2 changed files with 6 additions and 0 deletions

View File

@ -53,6 +53,7 @@ class Interface:
self.rxb = 0 self.rxb = 0
self.txb = 0 self.txb = 0
self.online = False self.online = False
self.ingress_control = True
self.ia_freq_deque = deque(maxlen=Interface.IA_FREQ_SAMPLES) self.ia_freq_deque = deque(maxlen=Interface.IA_FREQ_SAMPLES)
self.oa_freq_deque = deque(maxlen=Interface.OA_FREQ_SAMPLES) self.oa_freq_deque = deque(maxlen=Interface.OA_FREQ_SAMPLES)

View File

@ -447,6 +447,10 @@ class Reticulum:
if c["pass_phrase"] != "": if c["pass_phrase"] != "":
ifac_netkey = c["pass_phrase"] ifac_netkey = c["pass_phrase"]
ingress_control = True
if "ingress_control" in c:
ingress_control = c.as_bool("ingress_control")
configured_bitrate = None configured_bitrate = None
if "bitrate" in c: if "bitrate" in c:
if c.as_int("bitrate") >= Reticulum.MINIMUM_BITRATE: if c.as_int("bitrate") >= Reticulum.MINIMUM_BITRATE:
@ -884,6 +888,7 @@ class Reticulum:
interface.announce_rate_target = announce_rate_target interface.announce_rate_target = announce_rate_target
interface.announce_rate_grace = announce_rate_grace interface.announce_rate_grace = announce_rate_grace
interface.announce_rate_penalty = announce_rate_penalty interface.announce_rate_penalty = announce_rate_penalty
interface.ingress_control = ingress_control
interface.ifac_netname = ifac_netname interface.ifac_netname = ifac_netname
interface.ifac_netkey = ifac_netkey interface.ifac_netkey = ifac_netkey