diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2019-05-20 15:27:38 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2019-05-20 15:27:38 +0200 |
commit | 9eba62ef1d6b4896de693976116f69a9692332d9 (patch) | |
tree | 98ae9fdf48818206a6db552938c53e35abf1c45d /src/ee/__init__.py | |
parent | def66a1bd81283d38b468b66ff6e4e34621a5ce2 (diff) | |
download | ee-python-9eba62ef1d6b4896de693976116f69a9692332d9.tar.gz ee-python-9eba62ef1d6b4896de693976116f69a9692332d9.tar.bz2 ee-python-9eba62ef1d6b4896de693976116f69a9692332d9.tar.xz ee-python-9eba62ef1d6b4896de693976116f69a9692332d9.zip |
ee:
o Adding FactType as a smaller wrapper around the fact uri.
o Adding ee.part.Facts, used as Part.facts
o Renaming 'type' uri to 'ee-component-type'.
kicad-make-bom: Removing strategy functionality, replaced with
part-apply-function. Moving default strategy contents into
ee.kicad.functions.
Diffstat (limited to 'src/ee/__init__.py')
-rw-r--r-- | src/ee/__init__.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/ee/__init__.py b/src/ee/__init__.py index 93c73f7..2ba113e 100644 --- a/src/ee/__init__.py +++ b/src/ee/__init__.py @@ -8,6 +8,11 @@ from ee.formatting import eng_str __all__ = [ "EeException", "EeVal", + "EeValType", + "resistance_type", + "capacitance_type", + "inductance_type", + "power_type", ] @@ -15,6 +20,18 @@ class EeException(Exception): pass +class EeValType(object): + def __init__(self, symbol, alternate_symbols): + self.symbol = symbol + self.alternate_symbols = alternate_symbols + + +resistance_type = EeValType("\u2126", ["ohm"]) +capacitance_type = EeValType("F", []) +inductance_type = EeValType("H", []) +power_type = EeValType("W", []) + + @total_ordering class EeVal(object): units = ['F', @@ -102,4 +119,3 @@ class EeVal(object): def __float__(self): return self._value * math.pow(10, self._exp) - |