Prepare interface modularity

This commit is contained in:
Mark Qvist 2024-11-22 11:27:46 +01:00
parent ec9bb33d16
commit 5d5abf352b

View File

@ -550,24 +550,26 @@ class Reticulum:
try: try:
def interface_post_init(interface): def interface_post_init(interface):
if "outgoing" in c and c.as_bool("outgoing") == False: if interface != None:
interface.OUT = False if "outgoing" in c and c.as_bool("outgoing") == False:
else: interface.OUT = False
interface.OUT = True else:
interface.OUT = True
interface.mode = interface_mode interface.mode = interface_mode
interface.announce_cap = announce_cap interface.announce_cap = announce_cap
if configured_bitrate: if configured_bitrate:
interface.bitrate = configured_bitrate interface.bitrate = configured_bitrate
if ifac_size != None: if ifac_size != None:
interface.ifac_size = ifac_size interface.ifac_size = ifac_size
else: else:
interface.ifac_size = interface.DEFAULT_IFAC_SIZE interface.ifac_size = interface.DEFAULT_IFAC_SIZE
interface = None interface = None
if (("interface_enabled" in c) and c.as_bool("interface_enabled") == True) or (("enabled" in c) and c.as_bool("enabled") == True): if (("interface_enabled" in c) and c.as_bool("interface_enabled") == True) or (("enabled" in c) and c.as_bool("enabled") == True):
interface_config = c interface_config = c
interface_config["name"] = name interface_config["name"] = name
interface_config["selected_interface_mode"] = interface_mode
interface_config["configured_bitrate"] = configured_bitrate interface_config["configured_bitrate"] = configured_bitrate
if c["type"] == "AutoInterface": if c["type"] == "AutoInterface":
@ -1130,6 +1132,14 @@ class Reticulum:
return None return None
def halt_interface(self, interface):
pass
def resume_interface(self, interface):
pass
def reload_interface(self, interface):
pass
@staticmethod @staticmethod
def should_use_implicit_proof(): def should_use_implicit_proof():