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
a47d36e3
Commit
a47d36e3
authored
Apr 03, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew: fix Bug #1163201. Fix Bug #1162779. Fix incorrect comment in CMakeLists.txt.
parent
41d254fb
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
207 additions
and
134 deletions
+207
-134
CMakeLists.txt
CMakeLists.txt
+1
-1
drawtxt.cpp
common/drawtxt.cpp
+118
-91
netlist_reader_common.cpp
pcbnew/netlist_reader_common.cpp
+4
-0
netlist_reader_kicad.cpp
pcbnew/netlist_reader_kicad.cpp
+84
-42
No files found.
CMakeLists.txt
View file @
a47d36e3
...
...
@@ -42,7 +42,7 @@ option(KICAD_STABLE_VERSION
)
option
(
KICAD_TESTING_VERSION
"set this option to ON to build the
stable
version of KICAD. mainly used to set version ID (default OFF)"
"set this option to ON to build the
testing
version of KICAD. mainly used to set version ID (default OFF)"
)
option
(
KICAD_SCRIPTING
...
...
common/drawtxt.cpp
View file @
a47d36e3
This diff is collapsed.
Click to expand it.
pcbnew/netlist_reader_common.cpp
View file @
a47d36e3
...
...
@@ -236,6 +236,7 @@ void NETLIST_READER::TestFootprintsMatchingAndExchange()
break
;
}
}
if
(
cmp_info
==
NULL
)
// not found in netlist
continue
;
...
...
@@ -296,9 +297,11 @@ int NETLIST_READER::SetPadsNetName( const wxString & aModule, const wxString & a
int
padcount
=
0
;
MODULE
*
module
=
m_pcbframe
->
GetBoard
()
->
FindModuleByReference
(
aModule
);
if
(
module
)
{
D_PAD
*
pad
=
module
->
FindPadByName
(
aPadname
);
if
(
pad
)
{
padcount
++
;
...
...
@@ -316,6 +319,7 @@ int NETLIST_READER::SetPadsNetName( const wxString & aModule, const wxString & a
}
return
padcount
;
}
if
(
m_messageWindow
)
{
wxString
msg
;
...
...
pcbnew/netlist_reader_kicad.cpp
View file @
a47d36e3
...
...
@@ -173,62 +173,104 @@ void NETLIST_READER_KICAD_PARSER::SkipCurrent() throw( IO_ERROR, PARSE_ERROR )
void
NETLIST_READER_KICAD_PARSER
::
Parse
(
BOARD
*
aBrd
)
throw
(
IO_ERROR
,
PARSE_ERROR
)
{
wxString
text
;
int
plevel
=
0
;
// the count of ')' to read and end of file,
// after parsing all sections
while
(
(
token
=
NextTok
()
)
!=
T_EOF
)
{
if
(
token
==
T_LEFT
)
token
=
NextTok
();
if
(
token
==
T_components
)
switch
(
token
)
{
// The section comp starts here.
while
(
(
token
=
NextTok
()
)
!=
T_RIGHT
)
{
if
(
token
==
T_LEFT
)
token
=
NextTok
();
if
(
token
==
T_comp
)
case
T_export
:
// The netlist starts here.
// nothing to do here,
// just increment the count of ')' to read and end of file
plevel
++
;
break
;
case
T_version
:
// The netlist starts here.
// version id not yet used: read it but does not use it
NextTok
();
NeedRIGHT
();
break
;
case
T_components
:
// The section comp starts here.
while
(
(
token
=
NextTok
()
)
!=
T_RIGHT
)
{
// A comp section if found. Read it
COMPONENT_INFO
*
cmp_info
=
ParseComp
();
netlist_reader
->
AddModuleInfo
(
cmp_info
);
if
(
token
==
T_LEFT
)
token
=
NextTok
();
if
(
token
==
T_comp
)
// A comp section if found. Read it
{
COMPONENT_INFO
*
cmp_info
=
ParseComp
();
netlist_reader
->
AddModuleInfo
(
cmp_info
);
}
}
}
if
(
netlist_reader
->
BuildModuleListOnlyOpt
()
)
return
;
// at this point, the module list is read and built.
// Load new footprints
netlist_reader
->
InitializeModules
();
netlist_reader
->
TestFootprintsMatchingAndExchange
();
}
if
(
token
==
T_nets
)
{
// The section nets starts here.
while
(
(
token
=
NextTok
()
)
!=
T_RIGHT
)
{
if
(
token
==
T_LEFT
)
token
=
NextTok
();
if
(
token
==
T_net
)
if
(
netlist_reader
->
BuildModuleListOnlyOpt
()
)
return
;
// at this point, the module list is read and built.
// Load new footprints
netlist_reader
->
InitializeModules
();
netlist_reader
->
TestFootprintsMatchingAndExchange
();
break
;
case
T_nets
:
// The section nets starts here.
while
(
(
token
=
NextTok
()
)
!=
T_RIGHT
)
{
// A net section if found. Read it
ParseNet
(
aBrd
);
if
(
token
==
T_LEFT
)
token
=
NextTok
();
if
(
token
==
T_net
)
{
// A net section if found. Read it
ParseNet
(
aBrd
);
}
}
}
}
break
;
if
(
token
==
T_libparts
&&
netlist_reader
->
ReadLibpartSectionOpt
()
)
{
// The section libparts starts here.
while
(
(
token
=
NextTok
()
)
!=
T_RIGHT
)
{
if
(
token
==
T_LEFT
)
token
=
NextTok
();
if
(
token
==
T_libpart
)
case
T_libparts
:
// The section libparts starts here.
if
(
netlist_reader
->
ReadLibpartSectionOpt
()
)
{
// A libpart section if found. Read it
ParseKicadLibpartList
();
while
(
(
token
=
NextTok
()
)
!=
T_RIGHT
)
{
if
(
token
==
T_LEFT
)
token
=
NextTok
();
if
(
token
==
T_libpart
)
{
// A libpart section if found. Read it
ParseKicadLibpartList
();
}
}
}
}
else
SkipCurrent
();
break
;
case
T_libraries
:
// The section libraries starts here.
// List of libraries in use.
// Not used here, just skip it
SkipCurrent
();
break
;
case
T_design
:
// The section design starts here.
// Not used (mainly thet are comments), just skip it
SkipCurrent
();
break
;
case
T_RIGHT
:
// The closing parenthesis of the file.
// Not used (mainly thet are comments), just skip it
plevel
--
;
break
;
default
:
SkipCurrent
();
break
;
}
}
if
(
plevel
!=
0
)
{
wxLogDebug
(
wxT
(
"NETLIST_READER_KICAD_PARSER::Parse(): bad parenthesis count (count = %d"
),
plevel
);
}
}
void
NETLIST_READER_KICAD_PARSER
::
ParseNet
(
BOARD
*
aBrd
)
...
...
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