diff --git a/src/faebryk/libs/kicad/fileformats_sch.py b/src/faebryk/libs/kicad/fileformats_sch.py index 3bd8df54..816d3db9 100644 --- a/src/faebryk/libs/kicad/fileformats_sch.py +++ b/src/faebryk/libs/kicad/fileformats_sch.py @@ -163,7 +163,12 @@ class E_show_hide(SymEnum): hide = "hide" show = "show" + @dataclass + class C_power: + pass + name: str = field(**sexp_field(positional=True)) + power: Optional[C_power] = None propertys: list[C_property] = field( **sexp_field(multidict=True), default_factory=list ) diff --git a/test/libs/kicad/test_fileformats.py b/test/libs/kicad/test_fileformats.py index fdb7169c..3024df10 100644 --- a/test/libs/kicad/test_fileformats.py +++ b/test/libs/kicad/test_fileformats.py @@ -92,6 +92,9 @@ def test_parser(self): "http://www.ti.com/lit/ds/symlink/lm4990.pdf", ) + self.assertIsNotNone(sch.kicad_sch.lib_symbols.symbol["power:GND"].power) + self.assertIsNone(sch.kicad_sch.lib_symbols.symbol["Device:R"].power) + def test_write(self): pcb = C_kicad_pcb_file.loads(PCBFILE)