diff options
| author | Julian Blake Kongslie | 2022-05-15 15:59:17 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-05-15 15:59:17 -0700 |
| commit | 2b5a301077b436cb17156c3f17f2812856115d90 (patch) | |
| tree | 8a5a9074386326793fcddee36463fc36f437865e | |
| parent | Add an active probe to the test circuit (diff) | |
| download | lace-2b5a301077b436cb17156c3f17f2812856115d90.tar.xz | |
More unicode.
| -rwxr-xr-x | test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -11,7 +11,7 @@ def c(size) | |||
| 11 | end | 11 | end |
| 12 | 12 | ||
| 13 | def led(color="red") | 13 | def led(color="red") |
| 14 | comp("D", "0805", "LED", "1.5V 10mA #{color}") - r("220ohm") | 14 | comp("D", "0805", "LED", "1.5V 10mA #{color}") - r("220Ω") |
| 15 | end | 15 | end |
| 16 | 16 | ||
| 17 | def inverter() | 17 | def inverter() |
| @@ -39,12 +39,12 @@ def btn(color="black") | |||
| 39 | end | 39 | end |
| 40 | 40 | ||
| 41 | def probe(attenuation=20, impedance=50) | 41 | def probe(attenuation=20, impedance=50) |
| 42 | jack = comp("J", "SMB", "SMB jack", "#{attenuation}x #{impedance}ohm probe") | 42 | jack = comp("J", "SMB", "SMB jack", "#{attenuation}x #{impedance}Ω probe") |
| 43 | jack[2] - jack[3] - jack[4] - jack[5] | 43 | jack[2] - jack[3] - jack[4] - jack[5] |
| 44 | if attenuation == 1 | 44 | if attenuation == 1 |
| 45 | pair(jack[1], jack[2]) | 45 | pair(jack[1], jack[2]) |
| 46 | else | 46 | else |
| 47 | pair(r("#{(attenuation-1)*impedance}ohm") - jack[1], jack[2]) | 47 | pair(r("#{(attenuation-1)*impedance}Ω") - jack[1], jack[2]) |
| 48 | end | 48 | end |
| 49 | end | 49 | end |
| 50 | 50 | ||
| @@ -59,7 +59,7 @@ nl = Lace::Netlist.new do | |||
| 59 | 59 | ||
| 60 | x = $vcc - btn("white") | 60 | x = $vcc - btn("white") |
| 61 | x - net("x") - led("amber") - $gnd | 61 | x - net("x") - led("amber") - $gnd |
| 62 | x - inverter() - net("xbar") - led("blue") - $gnd | 62 | x - inverter() - net("x̅") - led("blue") - $gnd |
| 63 | x - probe - $gnd | 63 | x - probe - $gnd |
| 64 | end | 64 | end |
| 65 | 65 | ||
