mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Add docs and better logging to iads network
This commit is contained in:
parent
d0d56aceb6
commit
7ab8683d72
@ -119,6 +119,9 @@ class IadsNetwork:
|
|||||||
for node in self.nodes:
|
for node in self.nodes:
|
||||||
yield node.group.ground_object
|
yield node.group.ground_object
|
||||||
for connection in node.connections.values():
|
for connection in node.connections.values():
|
||||||
|
# Check for duplicate secondary node as a secondary node can be
|
||||||
|
# connected to 1..N primary nodes but we do not want to yiel them
|
||||||
|
# multiple times so we prevent dups
|
||||||
if connection.ground_object not in secondary_nodes:
|
if connection.ground_object not in secondary_nodes:
|
||||||
secondary_nodes.append(connection.ground_object)
|
secondary_nodes.append(connection.ground_object)
|
||||||
yield from secondary_nodes
|
yield from secondary_nodes
|
||||||
@ -278,7 +281,7 @@ class IadsNetwork:
|
|||||||
try:
|
try:
|
||||||
node.add_connection_for_tgo(self.ground_objects[secondary_node])
|
node.add_connection_for_tgo(self.ground_objects[secondary_node])
|
||||||
except KeyError:
|
except KeyError:
|
||||||
logging.error(
|
logging.exception(
|
||||||
f"IADS: No ground object found for connection {secondary_node}"
|
f"IADS: No ground object found for connection {secondary_node}"
|
||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user