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
0a2ed094
Commit
0a2ed094
authored
Sep 21, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
see todays change_log.txt
parent
eb660b7c
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1441 additions
and
1229 deletions
+1441
-1229
annotate.cpp
eeschema/annotate.cpp
+39
-26
component_class.cpp
eeschema/component_class.cpp
+14
-14
eelibs_draw_components.cpp
eeschema/eelibs_draw_components.cpp
+16
-3
fieldedi.cpp
eeschema/fieldedi.cpp
+0
-1118
fieldedi.cpp.notused
eeschema/fieldedi.cpp.notused
+1230
-0
netlist.cpp
eeschema/netlist.cpp
+131
-63
netlist.h
eeschema/netlist.h
+11
-5
No files found.
eeschema/annotate.cpp
View file @
0a2ed094
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
/* fonctions exportees */
/* fonctions exportees */
int
ListeComposants
(
CmpListStruct
*
BaseListeCmp
,
SCH_SCREEN
*
screen
,
int
NumSheet
);
int
ListeComposants
(
CmpListStruct
*
BaseListeCmp
,
SCH_SCREEN
*
screen
,
int
NumSheet
);
int
AnnotTriComposant
(
CmpListStruct
*
Objet1
,
CmpListStruct
*
Objet
2
);
int
AnnotTriComposant
(
const
void
*
o1
,
const
void
*
o
2
);
void
BreakReference
(
CmpListStruct
*
BaseListeCmp
,
int
NbOfCmp
);
void
BreakReference
(
CmpListStruct
*
BaseListeCmp
,
int
NbOfCmp
);
/* fonctions locales */
/* fonctions locales */
...
@@ -236,8 +236,7 @@ int ListeComposants( CmpListStruct* BaseListeCmp, SCH_SCREEN* screen, int NumShe
...
@@ -236,8 +236,7 @@ int ListeComposants( CmpListStruct* BaseListeCmp, SCH_SCREEN* screen, int NumShe
EDA_LibComponentStruct
*
Entry
;
EDA_LibComponentStruct
*
Entry
;
DrawList
=
screen
->
EEDrawList
;
DrawList
=
screen
->
EEDrawList
;
for
(
;
DrawList
;
DrawList
=
DrawList
->
Pnext
)
while
(
DrawList
)
{
{
switch
(
DrawList
->
Type
()
)
switch
(
DrawList
->
Type
()
)
{
{
...
@@ -253,10 +252,13 @@ int ListeComposants( CmpListStruct* BaseListeCmp, SCH_SCREEN* screen, int NumShe
...
@@ -253,10 +252,13 @@ int ListeComposants( CmpListStruct* BaseListeCmp, SCH_SCREEN* screen, int NumShe
Entry
=
FindLibPart
(
DrawLibItem
->
m_ChipName
.
GetData
(),
wxEmptyString
,
FIND_ROOT
);
Entry
=
FindLibPart
(
DrawLibItem
->
m_ChipName
.
GetData
(),
wxEmptyString
,
FIND_ROOT
);
if
(
Entry
==
NULL
)
if
(
Entry
==
NULL
)
break
;
break
;
if
(
BaseListeCmp
==
NULL
)
/* Items counting only */
if
(
BaseListeCmp
==
NULL
)
/* Items counting only */
{
{
NbrCmp
++
;
break
;
NbrCmp
++
;
break
;
}
}
BaseListeCmp
[
NbrCmp
].
m_Cmp
=
DrawLibItem
;
BaseListeCmp
[
NbrCmp
].
m_Cmp
=
DrawLibItem
;
BaseListeCmp
[
NbrCmp
].
m_NbParts
=
Entry
->
m_UnitCount
;
BaseListeCmp
[
NbrCmp
].
m_NbParts
=
Entry
->
m_UnitCount
;
BaseListeCmp
[
NbrCmp
].
m_Unit
=
DrawLibItem
->
m_Multi
;
BaseListeCmp
[
NbrCmp
].
m_Unit
=
DrawLibItem
->
m_Multi
;
...
@@ -265,8 +267,10 @@ int ListeComposants( CmpListStruct* BaseListeCmp, SCH_SCREEN* screen, int NumShe
...
@@ -265,8 +267,10 @@ int ListeComposants( CmpListStruct* BaseListeCmp, SCH_SCREEN* screen, int NumShe
BaseListeCmp
[
NbrCmp
].
m_IsNew
=
FALSE
;
BaseListeCmp
[
NbrCmp
].
m_IsNew
=
FALSE
;
BaseListeCmp
[
NbrCmp
].
m_Pos
=
DrawLibItem
->
m_Pos
;
BaseListeCmp
[
NbrCmp
].
m_Pos
=
DrawLibItem
->
m_Pos
;
BaseListeCmp
[
NbrCmp
].
m_TimeStamp
=
DrawLibItem
->
m_TimeStamp
;
BaseListeCmp
[
NbrCmp
].
m_TimeStamp
=
DrawLibItem
->
m_TimeStamp
;
if
(
DrawLibItem
->
m_Field
[
REFERENCE
].
m_Text
.
IsEmpty
()
)
if
(
DrawLibItem
->
m_Field
[
REFERENCE
].
m_Text
.
IsEmpty
()
)
DrawLibItem
->
m_Field
[
REFERENCE
].
m_Text
=
wxT
(
"DefRef?"
);
DrawLibItem
->
m_Field
[
REFERENCE
].
m_Text
=
wxT
(
"DefRef?"
);
strncpy
(
BaseListeCmp
[
NbrCmp
].
m_TextRef
,
strncpy
(
BaseListeCmp
[
NbrCmp
].
m_TextRef
,
CONV_TO_UTF8
(
DrawLibItem
->
m_Field
[
REFERENCE
].
m_Text
),
32
);
CONV_TO_UTF8
(
DrawLibItem
->
m_Field
[
REFERENCE
].
m_Text
),
32
);
...
@@ -274,6 +278,7 @@ int ListeComposants( CmpListStruct* BaseListeCmp, SCH_SCREEN* screen, int NumShe
...
@@ -274,6 +278,7 @@ int ListeComposants( CmpListStruct* BaseListeCmp, SCH_SCREEN* screen, int NumShe
if
(
DrawLibItem
->
m_Field
[
VALUE
].
m_Text
.
IsEmpty
()
)
if
(
DrawLibItem
->
m_Field
[
VALUE
].
m_Text
.
IsEmpty
()
)
DrawLibItem
->
m_Field
[
VALUE
].
m_Text
=
wxT
(
"~"
);
DrawLibItem
->
m_Field
[
VALUE
].
m_Text
=
wxT
(
"~"
);
strncpy
(
BaseListeCmp
[
NbrCmp
].
m_TextValue
,
strncpy
(
BaseListeCmp
[
NbrCmp
].
m_TextValue
,
CONV_TO_UTF8
(
DrawLibItem
->
m_Field
[
VALUE
].
m_Text
),
32
);
CONV_TO_UTF8
(
DrawLibItem
->
m_Field
[
VALUE
].
m_Text
),
32
);
NbrCmp
++
;
NbrCmp
++
;
...
@@ -291,8 +296,6 @@ int ListeComposants( CmpListStruct* BaseListeCmp, SCH_SCREEN* screen, int NumShe
...
@@ -291,8 +296,6 @@ int ListeComposants( CmpListStruct* BaseListeCmp, SCH_SCREEN* screen, int NumShe
default
:
default
:
break
;
break
;
}
}
DrawList
=
DrawList
->
Pnext
;
}
}
return
NbrCmp
;
return
NbrCmp
;
...
@@ -300,7 +303,7 @@ int ListeComposants( CmpListStruct* BaseListeCmp, SCH_SCREEN* screen, int NumShe
...
@@ -300,7 +303,7 @@ int ListeComposants( CmpListStruct* BaseListeCmp, SCH_SCREEN* screen, int NumShe
/*****************************************************************/
/*****************************************************************/
int
AnnotTriComposant
(
CmpListStruct
*
Objet1
,
CmpListStruct
*
Objet
2
)
int
AnnotTriComposant
(
const
void
*
o1
,
const
void
*
o
2
)
/****************************************************************/
/****************************************************************/
/* function used par qsort() for sorting the list
/* function used par qsort() for sorting the list
...
@@ -312,9 +315,11 @@ int AnnotTriComposant( CmpListStruct* Objet1, CmpListStruct* Objet2 )
...
@@ -312,9 +315,11 @@ int AnnotTriComposant( CmpListStruct* Objet1, CmpListStruct* Objet2 )
* if same sheet, by time stamp
* if same sheet, by time stamp
**/
**/
{
{
int
ii
;
CmpListStruct
*
Objet1
=
(
CmpListStruct
*
)
o1
;
CmpListStruct
*
Objet2
=
(
CmpListStruct
*
)
o2
;
int
ii
=
strnicmp
(
Objet1
->
m_TextRef
,
Objet2
->
m_TextRef
,
32
);
ii
=
strnicmp
(
Objet1
->
m_TextRef
,
Objet2
->
m_TextRef
,
32
);
if
(
SortByPosition
==
TRUE
)
if
(
SortByPosition
==
TRUE
)
{
{
if
(
ii
==
0
)
if
(
ii
==
0
)
...
@@ -401,7 +406,8 @@ void BreakReference( CmpListStruct* BaseListeCmp, int NbOfCmp )
...
@@ -401,7 +406,8 @@ void BreakReference( CmpListStruct* BaseListeCmp, int NbOfCmp )
BaseListeCmp
[
ii
].
m_IsNew
=
TRUE
;
BaseListeCmp
[
ii
].
m_IsNew
=
TRUE
;
if
(
!
BaseListeCmp
[
ii
].
m_PartsLocked
)
if
(
!
BaseListeCmp
[
ii
].
m_PartsLocked
)
BaseListeCmp
[
ii
].
m_Unit
=
0x7FFFFFFF
;
BaseListeCmp
[
ii
].
m_Unit
=
0x7FFFFFFF
;
Text
[
ll
]
=
0
;
continue
;
Text
[
ll
]
=
0
;
continue
;
}
}
if
(
isdigit
(
Text
[
ll
]
)
==
0
)
if
(
isdigit
(
Text
[
ll
]
)
==
0
)
...
@@ -646,7 +652,8 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
...
@@ -646,7 +652,8 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
/* 2eme passe : Remplissage du tableau des caracteristiques */
/* 2eme passe : Remplissage du tableau des caracteristiques */
if
(
OneSheetOnly
==
0
)
if
(
OneSheetOnly
==
0
)
{
{
ii
=
0
;
screen
=
ScreenSch
;
ii
=
0
;
screen
=
ScreenSch
;
for
(
screen
=
ScreenList
.
GetFirst
();
screen
!=
NULL
;
screen
=
ScreenList
.
GetNext
()
)
for
(
screen
=
ScreenList
.
GetFirst
();
screen
!=
NULL
;
screen
=
ScreenList
.
GetNext
()
)
{
{
ii
+=
ListeComposants
(
ListeCmp
+
ii
,
screen
,
NumSheet
);
ii
+=
ListeComposants
(
ListeCmp
+
ii
,
screen
,
NumSheet
);
...
@@ -658,9 +665,7 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
...
@@ -658,9 +665,7 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
ListeComposants
(
ListeCmp
,
screen
,
NumSheet
);
ListeComposants
(
ListeCmp
,
screen
,
NumSheet
);
}
}
qsort
(
ListeCmp
,
NbOfCmp
,
sizeof
(
CmpListStruct
),
qsort
(
ListeCmp
,
NbOfCmp
,
sizeof
(
CmpListStruct
),
AnnotTriComposant
);
(
int
(
*
)
(
const
void
*
,
const
void
*
)
)
AnnotTriComposant
);
/* Separation des Numeros de la reference: IC1 -> IC, et 1 dans .m_NumRef */
/* Separation des Numeros de la reference: IC1 -> IC, et 1 dans .m_NumRef */
BreakReference
(
ListeCmp
,
NbOfCmp
);
BreakReference
(
ListeCmp
,
NbOfCmp
);
...
@@ -669,13 +674,16 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
...
@@ -669,13 +674,16 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
error
=
0
;
error
=
0
;
for
(
ii
=
0
;
ii
<
NbOfCmp
-
1
;
ii
++
)
for
(
ii
=
0
;
ii
<
NbOfCmp
-
1
;
ii
++
)
{
{
msg
.
Empty
();
Buff
.
Empty
();
msg
.
Empty
();
Buff
.
Empty
();
if
(
ListeCmp
[
ii
].
m_IsNew
)
if
(
ListeCmp
[
ii
].
m_IsNew
)
{
{
if
(
ListeCmp
[
ii
].
m_NumRef
>=
0
)
if
(
ListeCmp
[
ii
].
m_NumRef
>=
0
)
Buff
<<
ListeCmp
[
ii
].
m_NumRef
;
Buff
<<
ListeCmp
[
ii
].
m_NumRef
;
else
else
Buff
=
wxT
(
"?"
);
Buff
=
wxT
(
"?"
);
cmpref
=
CONV_FROM_UTF8
(
ListeCmp
[
ii
].
m_TextRef
);
cmpref
=
CONV_FROM_UTF8
(
ListeCmp
[
ii
].
m_TextRef
);
msg
.
Printf
(
_
(
"item not annotated: %s%s"
),
cmpref
.
GetData
(),
Buff
.
GetData
()
);
msg
.
Printf
(
_
(
"item not annotated: %s%s"
),
cmpref
.
GetData
(),
Buff
.
GetData
()
);
...
@@ -685,7 +693,8 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
...
@@ -685,7 +693,8 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
msg
<<
Buff
;
msg
<<
Buff
;
}
}
DisplayError
(
NULL
,
msg
);
DisplayError
(
NULL
,
msg
);
error
++
;
break
;
error
++
;
break
;
}
}
if
(
MAX
(
ListeCmp
[
ii
].
m_NbParts
,
1
)
<
ListeCmp
[
ii
].
m_Unit
)
// Annotate error
if
(
MAX
(
ListeCmp
[
ii
].
m_NbParts
,
1
)
<
ListeCmp
[
ii
].
m_Unit
)
// Annotate error
...
@@ -702,24 +711,27 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
...
@@ -702,24 +711,27 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
ListeCmp
[
ii
].
m_Unit
,
ListeCmp
[
ii
].
m_NbParts
);
ListeCmp
[
ii
].
m_Unit
,
ListeCmp
[
ii
].
m_NbParts
);
msg
<<
Buff
;
msg
<<
Buff
;
DisplayError
(
frame
,
msg
);
DisplayError
(
frame
,
msg
);
error
++
;
break
;
error
++
;
break
;
}
}
}
}
if
(
error
)
if
(
error
)
return
error
;
return
error
;
/
* comptage des elements doubls (si tous sont annots) */
/
/ count the duplicated elements (if all are annotated)
for
(
ii
=
0
;
(
ii
<
NbOfCmp
-
1
)
&&
(
error
<
4
);
ii
++
)
for
(
ii
=
0
;
(
ii
<
NbOfCmp
-
1
)
&&
(
error
<
4
);
ii
++
)
{
{
msg
.
Empty
();
Buff
.
Empty
();
msg
.
Empty
();
Buff
.
Empty
();
if
(
(
stricmp
(
ListeCmp
[
ii
].
m_TextRef
,
ListeCmp
[
ii
+
1
].
m_TextRef
)
!=
0
)
if
(
(
stricmp
(
ListeCmp
[
ii
].
m_TextRef
,
ListeCmp
[
ii
+
1
].
m_TextRef
)
!=
0
)
||
(
ListeCmp
[
ii
].
m_NumRef
!=
ListeCmp
[
ii
+
1
].
m_NumRef
)
)
||
(
ListeCmp
[
ii
].
m_NumRef
!=
ListeCmp
[
ii
+
1
].
m_NumRef
)
)
continue
;
continue
;
/* Meme reference trouve */
/* Meme reference trouve */
/* Il y a erreur si meme unite */
/* Il y a erreur si meme unite */
if
(
ListeCmp
[
ii
].
m_Unit
==
ListeCmp
[
ii
+
1
].
m_Unit
)
if
(
ListeCmp
[
ii
].
m_Unit
==
ListeCmp
[
ii
+
1
].
m_Unit
)
{
{
if
(
ListeCmp
[
ii
].
m_NumRef
>=
0
)
if
(
ListeCmp
[
ii
].
m_NumRef
>=
0
)
Buff
<<
ListeCmp
[
ii
].
m_NumRef
;
Buff
<<
ListeCmp
[
ii
].
m_NumRef
;
...
@@ -736,7 +748,8 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
...
@@ -736,7 +748,8 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
msg
<<
Buff
;
msg
<<
Buff
;
}
}
DisplayError
(
frame
,
msg
);
DisplayError
(
frame
,
msg
);
error
++
;
continue
;
error
++
;
continue
;
}
}
/* Il y a erreur si unites differentes mais nombre de parts differentes
/* Il y a erreur si unites differentes mais nombre de parts differentes
...
@@ -771,9 +784,9 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
...
@@ -771,9 +784,9 @@ int CheckAnnotate( WinEDA_SchematicFrame* frame, bool OneSheetOnly )
nextcmpvalue
=
CONV_FROM_UTF8
(
ListeCmp
[
ii
+
1
].
m_TextValue
);
nextcmpvalue
=
CONV_FROM_UTF8
(
ListeCmp
[
ii
+
1
].
m_TextValue
);
msg
.
Printf
(
_
(
"Diff values for %s%d%c (%s) and %s%d%c (%s)"
),
msg
.
Printf
(
_
(
"Diff values for %s%d%c (%s) and %s%d%c (%s)"
),
cmpref
.
GetData
(),
ListeCmp
[
ii
].
m_NumRef
,
ListeCmp
[
ii
].
m_Unit
+
'A'
-
1
,
cmpref
.
GetData
(),
ListeCmp
[
ii
].
m_NumRef
,
ListeCmp
[
ii
].
m_Unit
+
'A'
-
1
,
cmpvalue
.
GetData
(),
cmpvalue
.
GetData
(),
nextcmpref
.
GetData
(),
nextcmpref
.
GetData
(
ListeCmp
[
ii
+
1
].
m_NumRef
,
),
ListeCmp
[
ii
+
1
].
m_NumRef
,
ListeCmp
[
ii
+
1
].
m_Unit
+
'A'
-
1
,
ListeCmp
[
ii
+
1
].
m_Unit
+
'A'
-
1
,
nextcmpvalue
.
GetData
()
);
nextcmpvalue
.
GetData
()
);
DisplayError
(
frame
,
msg
);
DisplayError
(
frame
,
msg
);
...
...
eeschema/component_class.cpp
View file @
0a2ed094
...
@@ -49,20 +49,20 @@ const wxString& ReturnDefaultFieldName( int aFieldNdx )
...
@@ -49,20 +49,20 @@ const wxString& ReturnDefaultFieldName( int aFieldNdx )
* for I18n
* for I18n
*/
*/
{
{
// avoid unnecessarily copying wxStrings.
// avoid unnecessarily copying wxStrings
at runtime
.
static
const
wxString
FieldDefaultNameList
[]
=
{
static
const
wxString
FieldDefaultNameList
[]
=
{
_
(
"Ref"
),
/* Reference of part, i.e. "IC21" */
_
(
"Ref"
),
/* Reference of part, i.e. "IC21" */
_
(
"Value"
),
/* Value of part, i.e. "3.3K" */
_
(
"Value"
),
/* Value of part, i.e. "3.3K" */
_
(
"Footprint"
),
/* Footprint, used by cvpcb or pcbnew, i.e. "16DIP300" */
_
(
"Footprint"
),
/* Footprint, used by cvpcb or pcbnew, i.e. "16DIP300" */
_
(
"Sheet"
),
/* for components which are a schematic file, schematic file name, i.e. "cnt16.sch" */
_
(
"Sheet"
),
/* for components which are a schematic file, schematic file name, i.e. "cnt16.sch" */
_
(
"Field1"
),
/* User fields (1 to n) have an editable name*/
wxString
(
_
(
"Field"
))
+
wxT
(
"1"
),
_
(
"Field2"
),
wxString
(
_
(
"Field"
))
+
wxT
(
"2"
),
_
(
"Field3"
),
wxString
(
_
(
"Field"
))
+
wxT
(
"3"
),
_
(
"Field4"
),
wxString
(
_
(
"Field"
))
+
wxT
(
"4"
),
_
(
"Field5"
),
wxString
(
_
(
"Field"
))
+
wxT
(
"5"
),
_
(
"Field6"
),
wxString
(
_
(
"Field"
))
+
wxT
(
"6"
),
_
(
"Field7"
),
wxString
(
_
(
"Field"
))
+
wxT
(
"7"
),
_
(
"Field8"
),
wxString
(
_
(
"Field"
))
+
wxT
(
"8"
),
wxT
(
"badFieldNdx!"
)
// error, and "sentinel" value
wxT
(
"badFieldNdx!"
)
// error, and "sentinel" value
};
};
...
...
eeschema/eelibs_draw_components.cpp
View file @
0a2ed094
...
@@ -348,7 +348,7 @@ EDA_LibComponentStruct* FindLibPart( const wxChar* Name, const wxString& LibName
...
@@ -348,7 +348,7 @@ EDA_LibComponentStruct* FindLibPart( const wxChar* Name, const wxString& LibName
{
{
EDA_LibComponentStruct
*
Entry
;
EDA_LibComponentStruct
*
Entry
;
static
EDA_LibComponentStruct
DummyEntry
(
wxEmptyString
);
/* Used only to call PQFind. */
static
EDA_LibComponentStruct
DummyEntry
(
wxEmptyString
);
/* Used only to call PQFind. */
LibraryStruct
*
Lib
=
g_LibraryList
;
LibraryStruct
*
Lib
=
g_LibraryList
;
...
@@ -357,24 +357,30 @@ EDA_LibComponentStruct* FindLibPart( const wxChar* Name, const wxString& LibName
...
@@ -357,24 +357,30 @@ EDA_LibComponentStruct* FindLibPart( const wxChar* Name, const wxString& LibName
PQCompFunc
(
(
PQCompFuncType
)
LibraryEntryCompare
);
PQCompFunc
(
(
PQCompFuncType
)
LibraryEntryCompare
);
Entry
=
NULL
;
FindLibName
.
Empty
();
Entry
=
NULL
;
FindLibName
.
Empty
();
while
(
Lib
)
while
(
Lib
)
{
{
if
(
!
LibName
.
IsEmpty
()
)
if
(
!
LibName
.
IsEmpty
()
)
{
{
if
(
Lib
->
m_Name
!=
LibName
)
if
(
Lib
->
m_Name
!=
LibName
)
{
{
Lib
=
Lib
->
m_Pnext
;
continue
;
Lib
=
Lib
->
m_Pnext
;
continue
;
}
}
}
}
if
(
Lib
==
NULL
)
if
(
Lib
==
NULL
)
break
;
break
;
Entry
=
(
EDA_LibComponentStruct
*
)
PQFind
(
Lib
->
m_Entries
,
&
DummyEntry
);
Entry
=
(
EDA_LibComponentStruct
*
)
PQFind
(
Lib
->
m_Entries
,
&
DummyEntry
);
if
(
Entry
!=
NULL
)
if
(
Entry
!=
NULL
)
{
{
FindLibName
=
Lib
->
m_Name
;
FindLibName
=
Lib
->
m_Name
;
break
;
break
;
}
}
Lib
=
Lib
->
m_Pnext
;
Lib
=
Lib
->
m_Pnext
;
}
}
...
@@ -425,11 +431,13 @@ void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC,
...
@@ -425,11 +431,13 @@ void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC,
/* Elimination des elements non relatifs a l'unite */
/* Elimination des elements non relatifs a l'unite */
if
(
Multi
&&
DEntry
->
m_Unit
&&
(
DEntry
->
m_Unit
!=
Multi
)
)
if
(
Multi
&&
DEntry
->
m_Unit
&&
(
DEntry
->
m_Unit
!=
Multi
)
)
continue
;
continue
;
if
(
convert
&&
DEntry
->
m_Convert
&&
(
DEntry
->
m_Convert
!=
convert
)
)
if
(
convert
&&
DEntry
->
m_Convert
&&
(
DEntry
->
m_Convert
!=
convert
)
)
continue
;
continue
;
if
(
DEntry
->
m_Flags
&
IS_MOVED
)
if
(
DEntry
->
m_Flags
&
IS_MOVED
)
continue
;
// Element en deplacement non trace
continue
;
// Element en deplacement non trace
SetHightColor
=
(
DEntry
->
m_Selected
&
IS_SELECTED
)
?
HIGHT_LIGHT_FLAG
:
0
;
SetHightColor
=
(
DEntry
->
m_Selected
&
IS_SELECTED
)
?
HIGHT_LIGHT_FLAG
:
0
;
LineWidth
=
MAX
(
DEntry
->
m_Width
,
g_DrawMinimunLineWidth
);
LineWidth
=
MAX
(
DEntry
->
m_Width
,
g_DrawMinimunLineWidth
);
...
@@ -494,10 +502,12 @@ void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC,
...
@@ -494,10 +502,12 @@ void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC,
{
{
LibDrawCircle
*
Circle
=
(
LibDrawCircle
*
)
DEntry
;
LibDrawCircle
*
Circle
=
(
LibDrawCircle
*
)
DEntry
;
CharColor
=
GETCOLOR
(
LAYER_DEVICE
);
CharColor
=
GETCOLOR
(
LAYER_DEVICE
);
x1
=
Pos
.
x
+
TransMat
[
0
][
0
]
*
Circle
->
m_Pos
.
x
+
x1
=
Pos
.
x
+
TransMat
[
0
][
0
]
*
Circle
->
m_Pos
.
x
+
TransMat
[
0
][
1
]
*
Circle
->
m_Pos
.
y
;
TransMat
[
0
][
1
]
*
Circle
->
m_Pos
.
y
;
y1
=
Pos
.
y
+
TransMat
[
1
][
0
]
*
Circle
->
m_Pos
.
x
+
y1
=
Pos
.
y
+
TransMat
[
1
][
0
]
*
Circle
->
m_Pos
.
x
+
TransMat
[
1
][
1
]
*
Circle
->
m_Pos
.
y
;
TransMat
[
1
][
1
]
*
Circle
->
m_Pos
.
y
;
fill_option
=
Circle
->
m_Fill
&
(
~
g_PrintFillMask
);
fill_option
=
Circle
->
m_Fill
&
(
~
g_PrintFillMask
);
if
(
Color
<
0
)
if
(
Color
<
0
)
{
{
...
@@ -526,10 +536,12 @@ void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC,
...
@@ -526,10 +536,12 @@ void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC,
/* The text orientation may need to be flipped if the
/* The text orientation may need to be flipped if the
* transformation matrix cuases xy axes to be flipped. */
* transformation matrix cuases xy axes to be flipped. */
t1
=
(
TransMat
[
0
][
0
]
!=
0
)
^
(
Text
->
m_Horiz
!=
0
);
t1
=
(
TransMat
[
0
][
0
]
!=
0
)
^
(
Text
->
m_Horiz
!=
0
);
x1
=
Pos
.
x
+
TransMat
[
0
][
0
]
*
Text
->
m_Pos
.
x
x1
=
Pos
.
x
+
TransMat
[
0
][
0
]
*
Text
->
m_Pos
.
x
+
TransMat
[
0
][
1
]
*
Text
->
m_Pos
.
y
;
+
TransMat
[
0
][
1
]
*
Text
->
m_Pos
.
y
;
y1
=
Pos
.
y
+
TransMat
[
1
][
0
]
*
Text
->
m_Pos
.
x
y1
=
Pos
.
y
+
TransMat
[
1
][
0
]
*
Text
->
m_Pos
.
x
+
TransMat
[
1
][
1
]
*
Text
->
m_Pos
.
y
;
+
TransMat
[
1
][
1
]
*
Text
->
m_Pos
.
y
;
DrawGraphicText
(
panel
,
DC
,
wxPoint
(
x1
,
y1
),
CharColor
,
Text
->
m_Text
,
DrawGraphicText
(
panel
,
DC
,
wxPoint
(
x1
,
y1
),
CharColor
,
Text
->
m_Text
,
t1
?
TEXT_ORIENT_HORIZ
:
TEXT_ORIENT_VERT
,
t1
?
TEXT_ORIENT_HORIZ
:
TEXT_ORIENT_VERT
,
Text
->
m_Size
,
Text
->
m_Size
,
...
@@ -579,6 +591,7 @@ void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC,
...
@@ -579,6 +591,7 @@ void DrawLibPartAux( WinEDA_DrawPanel* panel, wxDC* DC,
&&
!
g_ShowAllPins
)
&&
!
g_ShowAllPins
)
break
;
break
;
}
}
/* Calcul de l'orientation reelle de la Pin */
/* Calcul de l'orientation reelle de la Pin */
orient
=
Pin
->
ReturnPinDrawOrient
(
TransMat
);
orient
=
Pin
->
ReturnPinDrawOrient
(
TransMat
);
...
...
eeschema/fieldedi.cpp
deleted
100644 → 0
View file @
eb660b7c
This diff is collapsed.
Click to expand it.
eeschema/fieldedi.cpp.notused
0 → 100644
View file @
0a2ed094
This diff is collapsed.
Click to expand it.
eeschema/netlist.cpp
View file @
0a2ed094
This diff is collapsed.
Click to expand it.
eeschema/netlist.h
View file @
0a2ed094
...
@@ -36,7 +36,7 @@ typedef enum {
...
@@ -36,7 +36,7 @@ typedef enum {
/* Max pin number per component and footprint */
/* Max pin number per component and footprint */
#define MAXPIN 5000
#define MAXPIN 5000
typedef
enum
{
/* Type des objets de Net */
enum
NetObjetType
{
/* Type des objets de Net */
NET_SEGMENT
,
NET_SEGMENT
,
NET_BUS
,
NET_BUS
,
NET_JONCTION
,
NET_JONCTION
,
...
@@ -49,20 +49,21 @@ typedef enum { /* Type des objets de Net */
...
@@ -49,20 +49,21 @@ typedef enum { /* Type des objets de Net */
NET_PINLABEL
,
NET_PINLABEL
,
NET_PIN
,
NET_PIN
,
NET_NOCONNECT
NET_NOCONNECT
}
NetObjetType
;
};
typedef
enum
{
/* Valeur du Flag de connection */
enum
IsConnectType
{
/* Valeur du Flag de connection */
UNCONNECT
,
/* Pin ou Label non connecte */
UNCONNECT
,
/* Pin ou Label non connecte */
NOCONNECT
,
/* Pin volontairement non connectee (Symb. NoConnect utilise) */
NOCONNECT
,
/* Pin volontairement non connectee (Symb. NoConnect utilise) */
CONNECT
/* connexion normale */
CONNECT
/* connexion normale */
}
IsConnectType
;
};
/* Structure decrivant 1 element de connexion (pour netlist ) */
/* Structure decrivant 1 element de connexion (pour netlist ) */
class
ObjetNetListStruct
class
ObjetNetListStruct
{
{
public
:
public
:
void
*
m_Comp
;
/* Pointeur sur la definition de l'objet */
EDA_BaseStruct
*
m_Comp
;
/* Pointeur sur la definition de l'objet */
void
*
m_Link
;
/* Pour SheetLabelStruct: Pointeur sur la feuille de hierarchie
void
*
m_Link
;
/* Pour SheetLabelStruct: Pointeur sur la feuille de hierarchie
* Pour les Pins: pointeur sur le composant */
* Pour les Pins: pointeur sur le composant */
int
m_Flag
;
/* flag pour calculs internes */
int
m_Flag
;
/* flag pour calculs internes */
...
@@ -79,6 +80,11 @@ public:
...
@@ -79,6 +80,11 @@ public:
long
m_PinNum
;
/* numero de pin( 4 octets -> 4 codes ascii) */
long
m_PinNum
;
/* numero de pin( 4 octets -> 4 codes ascii) */
const
wxString
*
m_Label
;
/* Tous types Labels:pointeur sur la wxString definissant le label */
const
wxString
*
m_Label
;
/* Tous types Labels:pointeur sur la wxString definissant le label */
wxPoint
m_Start
,
m_End
;
wxPoint
m_Start
,
m_End
;
#if defined(DEBUG)
void
Show
(
std
::
ostream
&
out
,
int
ndx
);
#endif
};
};
...
...
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