Skip to content

Commit

Permalink
Add support for wire length units
Browse files Browse the repository at this point in the history
  • Loading branch information
zombielinux authored and kvid committed Oct 5, 2020
1 parent 55d8dba commit 1a973df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/wireviz/DataClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class Cable:
gauge_unit: Optional[str] = None
show_equiv: bool = False
length: float = 0
lengthunit: Optional[str] = None
color: Optional[str] = None
wirecount: Optional[int] = None
shield: bool = False
Expand Down Expand Up @@ -119,6 +120,9 @@ def __post_init__(self):

self.connections = []

if self.lengthunit is None: #Default wire length units to meters if left undeclared
self.lengthunit = 'm'

if self.wirecount: # number of wires explicitly defined
if self.colors: # use custom color palette (partly or looped if needed)
pass
Expand Down

0 comments on commit 1a973df

Please sign in to comment.