Add more suggestions by @kvid
This commit is contained in:
parent
4eea76736f
commit
03a207de92
@ -125,7 +125,7 @@ class Connector:
|
|||||||
raise Exception('You need to specify at least one, pincount, pins or pinlabels')
|
raise Exception('You need to specify at least one, pincount, pins or pinlabels')
|
||||||
self.pincount = max(len(self.pins), len(self.pinlabels), len(self.pincolors))
|
self.pincount = max(len(self.pins), len(self.pinlabels), len(self.pincolors))
|
||||||
|
|
||||||
# create default lists for pins (sequential) and pinlabels (blank) if not specified
|
# create default list for pins (sequential) if not specified
|
||||||
if not self.pins:
|
if not self.pins:
|
||||||
self.pins = list(range(1, self.pincount + 1))
|
self.pins = list(range(1, self.pincount + 1))
|
||||||
|
|
||||||
|
|||||||
@ -122,9 +122,13 @@ class Harness:
|
|||||||
if connector.pincolors:
|
if connector.pincolors:
|
||||||
if pincolor in wv_colors._color_hex.keys():
|
if pincolor in wv_colors._color_hex.keys():
|
||||||
pinhtml.append(f' <td sides="tbl">{pincolor}</td>')
|
pinhtml.append(f' <td sides="tbl">{pincolor}</td>')
|
||||||
pinhtml.append(f' <td sides="tbr"><table border="0" cellborder="1"><tr><td bgcolor="{wv_colors.translate_color(pincolor, "HEX")}" width="8" height="8" fixedsize="true"></td></tr></table></td>')
|
pinhtml.append( ' <td sides="tbr">')
|
||||||
|
pinhtml.append( ' <table border="0" cellborder="1"><tr>')
|
||||||
|
pinhtml.append(f' <td bgcolor="{wv_colors.translate_color(pincolor, "HEX")}" width="8" height="8" fixedsize="true"></td>')
|
||||||
|
pinhtml.append( ' </tr></table>')
|
||||||
|
pinhtml.append( ' </td>')
|
||||||
else:
|
else:
|
||||||
pinhtml.append(f' <td colspan="2"></td>')
|
pinhtml.append( ' <td colspan="2"></td>')
|
||||||
|
|
||||||
if connector.ports_right:
|
if connector.ports_right:
|
||||||
pinhtml.append(f' <td port="p{pin}r">{pin}</td>')
|
pinhtml.append(f' <td port="p{pin}r">{pin}</td>')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user