diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-05-13 09:45:09 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-05-13 09:45:09 +0200 |
commit | ee62dd01720c8481599a717d067014164af7e096 (patch) | |
tree | 734d5041f5363dcfc40fb4abad499cc080ae7260 /src/ee/kicad/read_schematic.py | |
parent | f81ef15ac28bcfea2dad9e7bfd78293f507210c0 (diff) | |
download | ee-python-ee62dd01720c8481599a717d067014164af7e096.tar.gz ee-python-ee62dd01720c8481599a717d067014164af7e096.tar.bz2 ee-python-ee62dd01720c8481599a717d067014164af7e096.tar.xz ee-python-ee62dd01720c8481599a717d067014164af7e096.zip |
ee.kicad.model: Adding Symbol, exposing in addition existing parsing of value. v4 and v5 compatible.
Diffstat (limited to 'src/ee/kicad/read_schematic.py')
-rw-r--r-- | src/ee/kicad/read_schematic.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ee/kicad/read_schematic.py b/src/ee/kicad/read_schematic.py index 401fc32..b5b4a1b 100644 --- a/src/ee/kicad/read_schematic.py +++ b/src/ee/kicad/read_schematic.py @@ -46,7 +46,7 @@ def read_schematic(path: str) -> Schematic: timestamp = None position = None library = None - name = None + symbol = None unit = None ref = None fields = [] @@ -67,7 +67,7 @@ def read_schematic(path: str) -> Schematic: raise EeException("Bad component line: {}:{}".format(path_basename, line)) if parts[0] == "L" and len(parts) == 3: - name = parts[1] + symbol = Symbol(parts[1]) ref = parts[2] elif parts[0] == "U" and len(parts) == 4: unit = int(parts[1]) @@ -97,7 +97,7 @@ def read_schematic(path: str) -> Schematic: else: raise EeException("Bad component field: {}: '{}'".format(path_basename, line)) - schematic.add_component(Component(position, timestamp, library, name, unit, ref, fields)) + schematic.add_component(Component(position, timestamp, library, symbol, unit, ref, fields)) def load(f): header = f.readline() |