1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2025-04-21 12:27:27 +03:00

Avoid leading zeroes in resistance and capacitance values (except 0R)

- boom/lib/e12.inc: several rules produces mal-formed results with leading
  zeroes
- boom/manu/Makefile.common (spotless): added new target to remove
  $(NAME).chr
- boom/manu/Makefile.common (MALFORMED): test for leading zeroes, allowing
  only 0R as an exception
- boom/manu/stackpole/stackpole.gen: catch values < 1 R and convert them
  to mR
This commit is contained in:
Werner Almesberger
2010-10-18 17:23:19 -03:00
parent 9e9eb89f3b
commit 2744057e98
3 changed files with 12 additions and 6 deletions

View File

@@ -8,7 +8,8 @@ _E12_1=(??)4 -> _E12=${_E12_1:1}0k
_E12_1=(?)(?)5 -> _E12=$_E12_1:1.${_E12_1:2}M
_E12_1=(??)6 -> _E12=${_E12_1:1}M
_E12_1=(??)7 -> _E12=${_E12_1:1}0M
_E12_1=R(??) -> _E12=0.$_E12_1:1
_E12_1=R(??) -> _E12=${_E12_1:1}0m
_E12_1=R00 -> _E12=0 # override previous
_E12_1=(?)R(?) -> _E12=$_E12_1:1.$_E12_1:2
# E96 scale
@@ -19,7 +20,7 @@ _E12_1=(??)(?)2 -> _E12=$_E12_1:1.${_E12_1:2}k
_E12_1=(???)3 -> _E12=${_E12_1:1}k
_E12_1=(?)(??)4 -> _E12=$_E12_1:1.${_E12_1:2}M
_E12_1=(??)(?)5 -> _E12=$_E12_1:1.${_E12_1:2}M
_E12_1=R(???) -> _E12=0.$_E12_1:1
_E12_1=R(???) -> _E12=${_E12_1:1}m
_E12_1=(?)R(??) -> _E12=$_E12_1:1.$_E12_1:2
_E12_1=(??)R(?) -> _E12=$_E12_1:1.$_E12_1:2
@@ -35,8 +36,9 @@ _E12_P=(??)4 -> _E12=${_E12_P:1}0n
_E12_P=(?)(?)5 -> _E12=$_E12_P:1.${_E12_P:2}u
_E12_P=(??)6 -> _E12=${_E12_P:1}u
_E12_P=(??)7 -> _E12=${_E12_P:1}0u
_E12_P=R(??) -> _E12=0.${_E12_P:1}p
_E12_P=(?)R(?) -> _E12=$_E12_P:1.${_E12_P:2}p
_E12_P=R(??) -> _E12=${_E12_P:1}0f
_E12_P=0R(?) -> _E12=${_E12_P:1}00f
_E12_P=([1-9])R(?) -> _E12=$_E12_P:1.${_E12_P:2}p
# remove leading and trailing zeroes