v0.2.4: Fix critical bugs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
examples/
|
||||
src/
|
||||
node-modules/
|
||||
src/
|
||||
test/
|
||||
|
||||
17
install.js
17
install.js
@@ -1,17 +0,0 @@
|
||||
if(process.platform=='linux'){
|
||||
|
||||
var sys = require('util');
|
||||
var exec = require('child_process').exec;
|
||||
var child;
|
||||
|
||||
child = exec("cp src/qeda /etc/bash_completion.d/qeda", function (error, stdout, stderr) {
|
||||
console.log('stdout: ' + stdout);
|
||||
console.log('stderr: ' + stderr);
|
||||
if (error !== null) {
|
||||
console.log('exec error: ' + error);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "qeda",
|
||||
"version": "0.2.3",
|
||||
"version": "0.2.4",
|
||||
"description": "QEDA — a tool for creating libraries of electronic components",
|
||||
"main": "lib/qeda.js",
|
||||
"bin": {
|
||||
@@ -18,7 +18,7 @@
|
||||
"electronics",
|
||||
"library"
|
||||
],
|
||||
"author": "Noviga",
|
||||
"author": "QEDA Authors",
|
||||
"contributors": [
|
||||
"Filippo Savi <filssavi@gmail.com>"
|
||||
],
|
||||
@@ -29,7 +29,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"prepublish": "coffee -o lib -c src/",
|
||||
"install": "node install.js",
|
||||
"install": "scripts/install.js",
|
||||
"postpublish": "rm -rf lib"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
17
scripts/install.js
Executable file
17
scripts/install.js
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
'use strict';
|
||||
|
||||
if (process.platform == 'linux') {
|
||||
var sys = require('util');
|
||||
var exec = require('child_process').exec;
|
||||
var child;
|
||||
|
||||
child = exec("cp scripts/qeda /etc/bash_completion.d/qeda", function (error, stdout, stderr) {
|
||||
if (error !== null) {
|
||||
console.log('Warning: ' + stderr);
|
||||
} else {
|
||||
console.log('stdout: ' + stdout);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
_qeda()
|
||||
_qeda()
|
||||
{
|
||||
local cur prev opts base
|
||||
COMPREPLY=()
|
||||
@@ -8,8 +8,8 @@ _qeda()
|
||||
#
|
||||
# The basic options we'll complete.
|
||||
#
|
||||
opts="--help --verbose --version reset add load power ground config generage test"
|
||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
||||
opts="--help --verbose --version reset add load power ground config generate test"
|
||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
||||
return 0
|
||||
}
|
||||
complete -F _qeda qeda
|
||||
@@ -1 +0,0 @@
|
||||
cp src/qeda /etc/bash_completion.d/qeda
|
||||
@@ -53,7 +53,12 @@ class QedaElement
|
||||
@delimiter[group] = value
|
||||
|
||||
# Create pin objects and groups
|
||||
@_addPins '', @pinout
|
||||
if typeof @pinout is 'string' # Unnamed pins
|
||||
pins = @parseMultiple @pinout
|
||||
for pin in pins
|
||||
@_addPins pin, pin
|
||||
else
|
||||
@_addPins '', @pinout
|
||||
|
||||
# Forming groups
|
||||
for key, value of @groups
|
||||
@@ -180,7 +185,6 @@ class QedaElement
|
||||
for k, v of pinOrGroup
|
||||
pinName = if @delimiter[name]? then (name + @delimiter[name] + k) else k
|
||||
pins = @_addPins pinName, v
|
||||
#@pinGroups[key] = pins
|
||||
@pinGroups[name] = @pinGroups[name].concat pins
|
||||
result = result.concat pins
|
||||
else # Pin number(s)
|
||||
|
||||
@@ -65,6 +65,7 @@ module.exports = (symbol, element) ->
|
||||
when 'G' then base = v # For IGBT
|
||||
when 'C' then collector = v
|
||||
when 'E' then emitter = v
|
||||
when '' then continue # Do nothing
|
||||
else needEnclosure = true
|
||||
valid = base? and collector? and emitter?
|
||||
|
||||
|
||||
@@ -71,6 +71,9 @@ updateElement = (element) ->
|
||||
purposeWeight = weight
|
||||
element.purpose = purpose
|
||||
|
||||
pinTextWidth = (symbol, pin, space, visible) ->
|
||||
if visible then (symbol.textWidth(pin.name, 'pin') + space) else 0
|
||||
|
||||
module.exports = (symbol, element) ->
|
||||
element.refDes = 'D'
|
||||
element.purpose = ''
|
||||
@@ -154,7 +157,7 @@ module.exports = (symbol, element) ->
|
||||
leftPins.push pin
|
||||
|
||||
if pin.name.length then noLeftText = false
|
||||
w = symbol.textWidth(pin.name, 'pin') + pinSpace
|
||||
w = pinTextWidth(symbol, pin, pinSpace, schematic.showPinNames)
|
||||
x1 = -width/2 - w - space
|
||||
if x > x1 then x = x1 # Make symbol wider
|
||||
y += pitch
|
||||
@@ -182,7 +185,7 @@ module.exports = (symbol, element) ->
|
||||
rightPins.push pin
|
||||
|
||||
if pin.name.length then noRightText = false
|
||||
w = symbol.textWidth(pin.name, 'pin') + pinSpace
|
||||
w = pinTextWidth(symbol, pin, pinSpace, schematic.showPinNames)
|
||||
x2 = textWidth/2 + w + space
|
||||
if x < x2 then x = x2 # Make symbol wider
|
||||
y += pitch
|
||||
@@ -194,8 +197,8 @@ module.exports = (symbol, element) ->
|
||||
symbol
|
||||
.lineWidth settings.lineWidth.thick
|
||||
.rectangle -width/2, 0, width/2, height, settings.fill
|
||||
unless noLeftText then symbol.line -textWidth/2 - space, 0, -textWidth/2 - space, height
|
||||
unless noRightText then symbol.line textWidth/2 + space, 0, textWidth/2 + space, height
|
||||
if schematic.showPinNames then symbol.line -textWidth/2 - space, 0, -textWidth/2 - space, height
|
||||
if schematic.showPinNames then symbol.line textWidth/2 + space, 0, textWidth/2 + space, height
|
||||
|
||||
# Gap lines
|
||||
x1 = width/2
|
||||
|
||||
218
test/.qeda.yaml
Normal file
218
test/.qeda.yaml
Normal file
@@ -0,0 +1,218 @@
|
||||
config:
|
||||
symbol:
|
||||
style: GOST
|
||||
library:
|
||||
- abc/hp1004
|
||||
- abracon/aseaig
|
||||
- aeip/mdm5-1ep
|
||||
- aeip/mdm5-2ep
|
||||
- altera/10m50sce144
|
||||
- altera/5m1270zt144
|
||||
- altera/maxv
|
||||
- amass/xt60pb
|
||||
- analog/ad623
|
||||
- analog/ad7908
|
||||
- analog/ad7918
|
||||
- analog/ad7928
|
||||
- analog/ad8208
|
||||
- analog/ad8226
|
||||
- analog/ad822
|
||||
- analog/ad8276
|
||||
- analog/ad8468
|
||||
- analog/ad8515
|
||||
- analog/ad8638
|
||||
- analog/ad8639
|
||||
- analog/ad9393
|
||||
- analog/adg1206
|
||||
- analog/adg508a
|
||||
- analog/adr291
|
||||
- analog/adr292
|
||||
- analog/adr293
|
||||
- analog/adr380
|
||||
- analog/adr381
|
||||
- analog/adr38x
|
||||
- analog/adum3201
|
||||
- atmel/ata6670
|
||||
- atmel/attiny25
|
||||
- avago/acpl-k71t
|
||||
- avago/acpl-k74t
|
||||
- bourns/cat16-f4
|
||||
- bourns/cra2512
|
||||
- bourns/srr0603
|
||||
- capacitor/c0201
|
||||
- capacitor/c0402
|
||||
- capacitor/c0603
|
||||
- capacitor/c0805
|
||||
- capacitor/c1206
|
||||
- capacitor/c1210
|
||||
- capacitor/c1808
|
||||
- capacitor/c1812
|
||||
- capacitor/c1825
|
||||
- capacitor/c2220
|
||||
- capacitor/c2225
|
||||
- capacitor/cae-a
|
||||
- capacitor/cp3216-18
|
||||
- capacitor/cp3528-21
|
||||
- capacitor/cp6032-28
|
||||
- capacitor/cp7343-31
|
||||
- capacitor/cp-a
|
||||
- capacitor/cp-b
|
||||
- capacitor/cp-c
|
||||
- capacitor/cp-d
|
||||
- cypress/cy15b102q
|
||||
- diode/bas40-04
|
||||
- diode/bas40-05
|
||||
- diode/bas40-06
|
||||
- diode/bas40
|
||||
- diode/d-mma
|
||||
- diode/d-mmb
|
||||
- diode/d-mmu
|
||||
- diode/led0603
|
||||
- diode/m1
|
||||
- diode/m2
|
||||
- diode/m3
|
||||
- diode/m4
|
||||
- diode/m5
|
||||
- diode/m6
|
||||
- diode/m7
|
||||
- diode/ss32
|
||||
- diode/ss33
|
||||
- diode/ss34
|
||||
- diode/ss35
|
||||
- diode/ss36
|
||||
- ecs/csm-7
|
||||
- ecs/ecx-33q
|
||||
- espressif/esp-07
|
||||
- fairchild/mbr0520l
|
||||
- harting/09682537613
|
||||
- hirose/df13a-6p-1.25h
|
||||
- inductor/l0402
|
||||
- inductor/l0603
|
||||
- inductor/l0805
|
||||
- inductor/l0806
|
||||
- inductor/l1008
|
||||
- inductor/l1206
|
||||
- infineon/kp235
|
||||
- irf/auirfs8409-7p
|
||||
- irf/ir2113s
|
||||
- irf/irf4905s
|
||||
- irf/irfl014n
|
||||
- irf/irfs4115
|
||||
- irf/irfs4310
|
||||
- irf/irg4bh20k
|
||||
- irf/irlml0060
|
||||
- issi/is64wv51216-ct
|
||||
- linear/lt1611
|
||||
- maxim/max14626
|
||||
- maxim/max1735
|
||||
- maxim/max6070
|
||||
- maxim/max6071
|
||||
- maxim/max607x
|
||||
- maxim/max6421
|
||||
- maxim/max764
|
||||
- maxim/max765
|
||||
- maxim/max766
|
||||
- maxim/max9924
|
||||
- maxim/max9925
|
||||
- maxim/max9927
|
||||
- micrel/mic29301
|
||||
- misc/bridge-1
|
||||
- misc/mh-4-8
|
||||
- misc/mh-5-10
|
||||
- misc/tp-sm-1
|
||||
- misc/tp-th-1
|
||||
- murata/bnx012-01
|
||||
- murata/lqh88p
|
||||
- nichicon/ubx1e102mhl
|
||||
- nichicon/ubx1h101mpl
|
||||
- nichicon/ubx1v102mhl
|
||||
- nichicon/ubx2a331mhl
|
||||
- nxp/bas521
|
||||
- nxp/bc846
|
||||
- nxp/bc856
|
||||
- nxp/bzv55
|
||||
- nxp/pmeg3030bep
|
||||
- nxp/tl431
|
||||
- ohmite/lvk24
|
||||
- onsemi/bas40l
|
||||
- onsemi/mbra340t3g
|
||||
- onsemi/mbrb20100ct
|
||||
- onsemi/mmbt3904l
|
||||
- onsemi/mmsd4148
|
||||
- onsemi/ncv7800
|
||||
- onsemi/nup2105l
|
||||
- resistor/r0201
|
||||
- resistor/r0402
|
||||
- resistor/r0603
|
||||
- resistor/r0805
|
||||
- resistor/r1206
|
||||
- resistor/r1210
|
||||
- resistor/r2010
|
||||
- resistor/r2512
|
||||
- samtec/mtmm-110-06-d
|
||||
- samtec/mtmm-116-06-q
|
||||
- samtec/tst-105-01-d
|
||||
- samtec/tst-107-01-d
|
||||
- st/l3gd20h
|
||||
- st/l9637
|
||||
- st/stps40150
|
||||
- tdk/b82422t
|
||||
- tdk/b82477g4
|
||||
- te/1206sfh
|
||||
- te/2410sfv
|
||||
- ti/ads7883
|
||||
- ti/cd4010b
|
||||
- ti/cd4093b
|
||||
- ti/dac104s085
|
||||
- ti/ina139
|
||||
- ti/ina169
|
||||
- ti/iso1050
|
||||
- ti/iso721
|
||||
- ti/iso7220
|
||||
- ti/iso7221
|
||||
- ti/iso722x
|
||||
- ti/iso722
|
||||
- ti/iso7230
|
||||
- ti/iso7231
|
||||
- ti/iso723x
|
||||
- ti/iso72x
|
||||
- ti/iso7640
|
||||
- ti/iso7641
|
||||
- ti/iso764x
|
||||
- ti/lm1086
|
||||
- ti/lm1117mpx
|
||||
- ti/lm158
|
||||
- ti/lm2576
|
||||
- ti/lm258
|
||||
- ti/lm2596
|
||||
- ti/lm27313
|
||||
- ti/lm2940
|
||||
- ti/lm358
|
||||
- ti/lm5050-2
|
||||
- ti/lmv321
|
||||
- ti/lp2951
|
||||
- ti/opa335
|
||||
- ti/ref02
|
||||
- ti/sn65hvd234
|
||||
- ti/sn74ahc125
|
||||
- ti/sn74hc4851
|
||||
- ti/sn74lvc1g07
|
||||
- ti/sn74lvc2t45-q1
|
||||
- ti/tl431
|
||||
- ti/tlv710
|
||||
- ti/tmp102
|
||||
- ti/tms320f28374dptp
|
||||
- ti/tms320f28379dptp
|
||||
- ti/tpd4e001-q1
|
||||
- ti/tps3702
|
||||
- ti/tps62420
|
||||
- ti/tps65217
|
||||
- ti/tps723
|
||||
- vicor/28c
|
||||
- vishay/bat42w
|
||||
- vishay/crcw2512
|
||||
- vishay/smbj
|
||||
- vishay/vs-10bq030
|
||||
- vishay/vs-30bq100
|
||||
- vishay/vs-mbrb20
|
||||
- yageo/tc124-jr-07
|
||||
Reference in New Issue
Block a user