Compare commits

...

5 Commits

Author SHA1 Message Date
e0c896e62d core update 2020-12-17 19:38:00 +01:00
34760becb9 Merge branch 'mueller/master' 2020-12-17 18:20:16 +01:00
75b01009f1 core update 2020-12-17 18:11:08 +01:00
264a4a791e updated globals 2020-12-17 18:09:00 +01:00
673a3e8ba4 core update 2020-12-17 18:03:08 +01:00
2 changed files with 7 additions and 12 deletions

View File

@@ -55,7 +55,7 @@ def add_globals_pre_args_parsing(gui: bool = False):
from tmtc_core.core.tmtcc_globals_manager import update_global
import pprint
update_global(GlobalIds.APID, 0xef)
update_global(GlobalIds.APID, 0x65)
update_global(GlobalIds.COM_IF, ComInterfaces.EthernetUDP)
update_global(GlobalIds.TC_SEND_TIMEOUT_FACTOR, 2)
update_global(GlobalIds.TM_TIMEOUT, 4)
@@ -206,17 +206,12 @@ def set_up_ethernet_cfg():
update_global(GlobalIds.USE_ETHERNET, True)
from tmtc_core.core.tmtcc_globals_manager import get_global
from config.tmtcc_definitions import EthernetConfig
from tmtc_core.com_if.tmtcc_ethernet_utilities import determine_ip_addresses
ethernet_cfg_dict = get_global(GlobalIds.ETHERNET_CONFIG)
# Local host and unused port as default config
default_send_ip = "127.0.0.1"
default_send_port = 7301
send_address = (default_send_ip, default_send_port)
ethernet_cfg_dict.update({EthernetConfig.SEND_ADDRESS: send_address})
# Bind to all interfaces (might be insecure!)
default_rcv_ip = ''
default_rcv_port = 7302
recv_address = (default_rcv_ip, default_rcv_port)
ethernet_cfg_dict.update({EthernetConfig.RECV_ADDRESS: recv_address})
# This will either load the addresses from a JSON file or prompt them from the user.
send_addr, rcv_addr = determine_ip_addresses()
ethernet_cfg_dict.update({EthernetConfig.SEND_ADDRESS: send_addr})
ethernet_cfg_dict.update({EthernetConfig.RECV_ADDRESS: rcv_addr})
update_global(GlobalIds.ETHERNET_CONFIG, ethernet_cfg_dict)