Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
62916eb2
Commit
62916eb2
authored
Oct 22, 2010
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Plain Diff
Fixed bug 664795 (not connected electrical pin type)
parents
dbd4fe12
796eca5c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
971 additions
and
946 deletions
+971
-946
class_pin.cpp
eeschema/class_pin.cpp
+26
-7
dialog_lib_edit_pin.fbp
eeschema/dialog_lib_edit_pin.fbp
+913
-913
erc.cpp
eeschema/erc.cpp
+32
-26
No files found.
eeschema/class_pin.cpp
View file @
62916eb2
...
...
@@ -150,6 +150,7 @@ const wxChar* MsgPinElectricType[] =
wxT
(
"power_out"
),
wxT
(
"openCol"
),
wxT
(
"openEm"
),
wxT
(
"NotConnected"
),
wxT
(
"?????"
)
};
...
...
@@ -602,6 +603,10 @@ bool LIB_PIN::Save( FILE* ExportFile )
case
PIN_OPENEMITTER
:
Etype
=
'E'
;
break
;
case
PIN_NC
:
Etype
=
'N'
;
break
;
}
ReturnPinStringNum
(
StringPinNum
);
...
...
@@ -728,6 +733,10 @@ bool LIB_PIN::Load( char* line, wxString& errorMsg )
m_PinType
=
PIN_OPENEMITTER
;
break
;
case
'N'
:
m_PinType
=
PIN_NC
;
break
;
default
:
errorMsg
.
Printf
(
wxT
(
"unknown pin type [%c]"
),
*
pinType
&
255
);
return
false
;
...
...
@@ -1034,16 +1043,26 @@ void LIB_PIN::DrawPinSymbol( WinEDA_DrawPanel* aPanel,
}
/* Draw the pin end target (active end of the pin)
* Draw but do not print the pin end target 1 pixel width
*/
if
(
!
screen
->
m_IsPrinting
)
#define NCSYMB_PIN_DIM TARGET_PIN_DIAM
if
(
m_PinType
==
PIN_NC
)
// Draw a N.C. symbol
{
GRLine
(
&
aPanel
->
m_ClipBox
,
aDC
,
posX
-
NCSYMB_PIN_DIM
,
posY
-
NCSYMB_PIN_DIM
,
posX
+
NCSYMB_PIN_DIM
,
posY
+
NCSYMB_PIN_DIM
,
width
,
color
);
GRLine
(
&
aPanel
->
m_ClipBox
,
aDC
,
posX
+
NCSYMB_PIN_DIM
,
posY
-
NCSYMB_PIN_DIM
,
posX
-
NCSYMB_PIN_DIM
,
posY
+
NCSYMB_PIN_DIM
,
width
,
color
);
}
/* Draw but do not print the pin end target 1 pixel width
*/
else
if
(
!
screen
->
m_IsPrinting
)
GRCircle
(
&
aPanel
->
m_ClipBox
,
aDC
,
posX
,
posY
,
aDC
,
posX
,
posY
,
TARGET_PIN_DIAM
,
0
,
color
);
0
,
color
);
}
...
...
eeschema/dialog_lib_edit_pin.fbp
View file @
62916eb2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
eeschema/erc.cpp
View file @
62916eb2
...
...
@@ -120,36 +120,40 @@ bool DiagErcTableInit; // go to TRUE after DiagErc init
/* Default Look up table which gives the diag for a pair of connected pins
* Same as DiagErc, but cannot be modified
* Used to init or reset DiagErc
* note also, to avoid inconsistancy:
* DefaultDiagErc[i][j] = DefaultDiagErc[j][i]
*/
int
DefaultDiagErc
[
PIN_NMAX
][
PIN_NMAX
]
=
{
/* I, O, Bi, 3S, Pas, UnS, PwrI, PwrO, OC, OE, NC */
/* I */
{
OK
,
OK
,
OK
,
OK
,
OK
,
WAR
,
OK
,
OK
,
OK
,
OK
,
WA
R
},
/* O */
{
OK
,
ERR
,
OK
,
WAR
,
OK
,
WAR
,
OK
,
ERR
,
ERR
,
ERR
,
WA
R
},
/* Bi*/
{
OK
,
OK
,
OK
,
OK
,
OK
,
WAR
,
OK
,
WAR
,
OK
,
WAR
,
WA
R
},
/* 3S*/
{
OK
,
WAR
,
OK
,
OK
,
OK
,
W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R
,
ER
R
},
/* OC */
{
OK
,
ERR
,
OK
,
WAR
,
OK
,
WAR
,
OK
,
ERR
,
OK
,
OK
,
ER
R
},
/* OE */
{
OK
,
ERR
,
WAR
,
WAR
,
OK
,
WAR
,
OK
,
ERR
,
OK
,
OK
,
ER
R
},
/* NC */
{
ERR
,
ERR
,
ERR
,
ERR
,
ERR
,
ERR
,
ERR
,
ERR
,
ERR
,
ERR
,
ER
R
}
};
/* Minimal connection table */
#define NPI 4
/* Net with Pin isolated, but this pin has type Not Connected, and must be left N.C. */
#define DRV 3
/* Net driven by a signal (a pin output for instance) */
#define NET_NC 2
/* Net "connected" to a "NoConnect symbol" */
#define NOD 1
/* Net not driven ( Such as 2 or more connected inputs )*/
#define NOC 0
/*
Pin isolated,
no connection */
#define NOC 0
/*
initial state of a net:
no connection */
/* Look up table which gives the minimal drive for a pair of connected pins on
* a net
* Initial state of a net is NOC (No Connection)
* Can be updated to NET_NC, or NOD (Not Driven) or DRV (DRIven)
* Initial state of a net is NOC (Net with No Connection)
* Can be updated to NPI (Pin Isolated), NET_NC (Net with a no connect symbol),
* NOD (Not Driven) or DRV (DRIven)
*
* Can be updated to NET_NC
only if the previous state is NOC
* Can be updated to NET_NC
with no error only if there is only one pin in net
*
* Nets are OK when their final state is NET_NC or DRV
* Nets with the state NOD have no source signal
...
...
@@ -157,17 +161,17 @@ int DefaultDiagErc[PIN_NMAX][PIN_NMAX] =
static
int
MinimalReq
[
PIN_NMAX
][
PIN_NMAX
]
=
{
/* In Out, Bi, 3S, Pas, UnS, PwrI,PwrO,OC, OE, NC */
/* In*/
{
NOD
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
NOD
,
DRV
,
DRV
,
DRV
,
N
OC
},
/*Out*/
{
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
N
OC
},
/* Bi*/
{
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
NOD
,
DRV
,
DR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DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
NOD
,
DRV
,
DRV
,
DRV
,
N
PI
},
/*PwrI*/
{
NOD
,
DRV
,
NOD
,
NOD
,
NOD
,
NOD
,
NOD
,
DRV
,
NOD
,
NOD
,
N
PI
},
/*PwrO*/
{
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
N
PI
},
/* OC*/
{
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
NOD
,
DRV
,
DRV
,
DRV
,
N
PI
},
/* OE*/
{
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
DRV
,
NOD
,
DRV
,
DRV
,
DRV
,
N
PI
},
/* NC*/
{
N
PI
,
NPI
,
NPI
,
NPI
,
NPI
,
NPI
,
NPI
,
NPI
,
NPI
,
NPI
,
NPI
}
};
...
...
@@ -303,7 +307,7 @@ void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
{
if
(
g_NetObjectslist
[
OldItem
]
->
GetNet
()
!=
g_NetObjectslist
[
NetItemRef
]
->
GetNet
()
)
{
{
// New ne found:
MinConn
=
NOC
;
NetNbItems
=
0
;
StartNet
=
NetItemRef
;
...
...
@@ -550,6 +554,8 @@ static void TestOthersItems( WinEDA_DrawPanel* panel,
NetItemTst
=
netstart
;
local_minconn
=
NOC
;
if
(
ref_elect_type
==
PIN_NC
)
local_minconn
=
NPI
;
/* Test pins connected to NetItemRef */
for
(
;
;
NetItemTst
++
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment