Skip to content

Commit

Permalink
import V7 fixes (net pair code, GUI text corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
MitjaNemec committed Mar 19, 2023
1 parent 1d63b23 commit 612c014
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion error_dialog_GUI.fbp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Fatal error when restoring layout. You can raise an issue on GiHub page. + &quot;Please attach the save_restore_layout.log which you should find in the project folder.</property>
<property name="label">Fatal error when replicating layout. You can raise an issue on GiHub page. + &quot;Please attach the save_restore_layout.log which you should find in the project folder.</property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
Expand Down
27 changes: 22 additions & 5 deletions replicate_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,19 @@ def parse_schematic_files(self, filename, dict_of_sheets):
path = contents[j].replace("(uuid ", '').rstrip(")").upper().strip()
sheet_id = path.replace('00000000-0000-0000-0000-0000', '')
if "(property \"Sheet name\"" in contents[j] or "(property \"Sheetname\"" in contents[j]:
sheetname = contents[j].replace("(property \"Sheet name\"", '').split("(")[0].replace("\"", "").strip()
sn_found = True
if "(property \"Sheet name\"" in contents[j]:
sheetname = contents[j].replace("(property \"Sheet name\"", '').split("(")[0].replace("\"", "").strip()
sn_found = True
if "(property \"Sheetname\"" in contents[j]:
sheetname = contents[j].replace("(property \"Sheetname\"", '').split("(")[0].replace("\"", "").strip()
sn_found = True
if "(property \"Sheet file\"" in contents[j] or "(property \"Sheetfile\"" in contents[j]:
sheetfile = contents[j].replace("(property \"Sheet file\"", '').split("(")[0].replace("\"", "").strip()
sf_found = True
if "(property \"Sheet file\"" in contents[j]:
sheetfile = contents[j].replace("(property \"Sheet file\"", '').split("(")[0].replace("\"", "").strip()
sf_found = True
if "(property \"Sheetfile\"" in contents[j]:
sheetfile = contents[j].replace("(property \"Sheetfile\"", '').split("(")[0].replace("\"", "").strip()
sf_found = True
# properly handle property not found
if not sn_found or not sf_found:
logger.info(f'Did not found sheetfile and/or sheetname properties in the schematic file '
Expand Down Expand Up @@ -692,10 +700,19 @@ def get_net_pairs(self, sheet):
if (src_net_depth == 1) and (dst_net_depth == 1):
net_pairs.append(net_pair)
continue
# if there is no clear match, check how well they match
# try to handle exotic cases
if (src_net_depth == dst_net_depth or net_delta_depth == fp_delta_depth) and src_net_path[-1] == dst_net_path[-1]:
net_pairs.append(net_pair)
continue
if (src_net_depth == dst_net_depth) and (src_net_path[0:-1] == dst_net_path[0:-1]):
net_pairs.append(net_pair)
continue
shorter_lenght = min(src_net_depth, dst_net_depth)
if (net_delta_depth == fp_delta_depth) and (src_net_path[-shorter_lenght:-1] == dst_net_path[-shorter_lenght:-1]):
net_pairs.append(net_pair)
continue
# if I didn't find proper pair, append it to list for reporting
logger.info(f"Cannot pair src net: {src_net_path} and dst net: {dst_net_path}")
connectivity_issues.append((fp_pair[1].ref, pad_nr))
if connectivity_issues:
"""
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.2
1.3.3

0 comments on commit 612c014

Please sign in to comment.