From 44ef7e627abba9c2d7f2121fb62b175d4d08956d Mon Sep 17 00:00:00 2001 From: iopapamanoglou Date: Wed, 11 Sep 2024 13:33:25 +0200 Subject: [PATCH] fix examples --- examples/iterative_design_nand.py | 2 +- examples/route.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/iterative_design_nand.py b/examples/iterative_design_nand.py index d510dd78..0a01cb1f 100644 --- a/examples/iterative_design_nand.py +++ b/examples/iterative_design_nand.py @@ -121,7 +121,7 @@ def App(): # parametrizing for _, t in app.get_graph().nodes_with_trait(F.ElectricLogic.has_pulls): for pull_resistor in (r for r in t.get_pulls() if r): - pull_resistor.resistance.merge(100 * P.kohm) + pull_resistor.resistance.merge(F.Range.from_center_rel(100 * P.kohm, 0.05)) power_source.power.voltage.merge(3 * P.V) led.led.led.brightness.merge( TypicalLuminousIntensity.APPLICATION_LED_INDICATOR_INSIDE.value.value diff --git a/examples/route.py b/examples/route.py index 0488ac0b..b53b3ab9 100644 --- a/examples/route.py +++ b/examples/route.py @@ -33,7 +33,7 @@ def __init__(self, extrude_y: float): def __preinit__(self): for resistor in self.resistors: - resistor.resistance.merge(F.Constant(1000 * P.ohm)) + resistor.resistance.merge(F.Range.from_center_rel(1000 * P.ohm, 0.05)) resistor.unnamed[0].connect(self.unnamed[0]) resistor.unnamed[1].connect(self.unnamed[1])