match loop index by value, add newlines to header
This commit is contained in:
parent
a544fb01ba
commit
32fb674e83
@ -93,8 +93,8 @@ class Harness:
|
||||
|
||||
def create_graph(self) -> Graph:
|
||||
dot = Graph()
|
||||
dot.body.append(f'// Graph generated by {APP_NAME} {__version__}')
|
||||
dot.body.append(f'// {APP_URL}')
|
||||
dot.body.append(f'// Graph generated by {APP_NAME} {__version__}\n')
|
||||
dot.body.append(f'// {APP_URL}\n')
|
||||
dot.attr('graph', rankdir='LR',
|
||||
ranksep='2',
|
||||
bgcolor=wv_colors.translate_color(self.options.bgcolor, "HEX"),
|
||||
@ -189,12 +189,8 @@ class Harness:
|
||||
else:
|
||||
raise Exception('No side for loops')
|
||||
for loop in connector.loops:
|
||||
if type(loop[0]) == str:
|
||||
i_loop_0 = connector.pins.index(loop[0])
|
||||
i_loop_1 = connector.pins.index(loop[1])
|
||||
else:
|
||||
i_loop_0 = loop[0]
|
||||
i_loop_1 = loop[1]
|
||||
i_loop_0 = connector.pins.index(loop[0])+1
|
||||
i_loop_1 = connector.pins.index(loop[1])+1
|
||||
dot.edge(f'{connector.name}:p{i_loop_0}{loop_side}:{loop_dir}',
|
||||
f'{connector.name}:p{i_loop_1}{loop_side}:{loop_dir}')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user