Skip to content

Commit 3079d86

Browse files
committed
wip
1 parent 574a06f commit 3079d86

3 files changed

Lines changed: 15 additions & 6 deletions

File tree

edg/abstract_parts/TestPoint.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ class BaseSingleTestPoint(BaseTypedTestPoint[TestPointLinkType], Block, Generic[
3939

4040
def __init__(self, *args: Any, **kwargs: Any) -> None:
4141
super().__init__(*args, **kwargs)
42-
self.tp = self.Block(TestPoint((self.tp_name == "").then_else(self.io.link().name(), self.tp_name)))
42+
self.tp = self.Block(TestPoint(StringExpr()))
43+
44+
@override
45+
def contents(self) -> None:
46+
super().contents()
47+
self.assign(self.tp.tp_name, (self.tp_name == "").then_else(self.io.link().name(), self.tp_name))
4348

4449

4550
@non_library
@@ -50,6 +55,10 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
5055
super().__init__(*args, **kwargs)
5156
self.conn = self.Block(RfConnector())
5257
self.gnd = self.Export(self.conn.gnd, [Common])
58+
59+
@override
60+
def contents(self) -> None:
61+
super().contents()
5362
self.conn.with_mixin(RfConnectorTestPoint((self.tp_name == "").then_else(self.io.link().name(), self.tp_name)))
5463

5564

examples/TestLed/TestLed.net.ref

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
(sheetpath (names "/led/") (tstamps "/02750136/"))
2626
(tstamps "0296014b")))
2727
(nets
28-
(net (code 1) (name "gnd.gnd")
29-
(node (ref R1) (pin 2)))
30-
(net (code 2) (name "src.io")
28+
(net (code 1) (name "led.signal")
3129
(node (ref D1) (pin 2)))
30+
(net (code 2) (name "led.gnd")
31+
(node (ref R1) (pin 2)))
3232
(net (code 3) (name "led.package.k")
3333
(node (ref D1) (pin 1))
3434
(node (ref R1) (pin 1))))

examples/TestLed/TestLed.svgpcb.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const R1 = board.add(R_0603_1608Metric, {
1212
})
1313

1414
board.setNetlist([
15-
{name: "gnd.gnd", pads: [["R1", "2"]]},
16-
{name: "src.io", pads: [["D1", "2"]]},
15+
{name: "led.signal", pads: [["D1", "2"]]},
16+
{name: "led.gnd", pads: [["R1", "2"]]},
1717
{name: "led.package.k", pads: [["D1", "1"], ["R1", "1"]]}
1818
])
1919

0 commit comments

Comments
 (0)