Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Add symbol power flag
Browse files Browse the repository at this point in the history
  • Loading branch information
iopapamanoglou committed Sep 13, 2024
1 parent e3fbbfa commit f5a9e6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/faebryk/libs/kicad/fileformats_sch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
3 changes: 3 additions & 0 deletions test/libs/kicad/test_fileformats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit f5a9e6b

Please sign in to comment.