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
...
@@ -42,7 +42,7 @@ option(KICAD_STABLE_VERSION
)
)
option
(
KICAD_TESTING_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
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()
...
@@ -236,6 +236,7 @@ void NETLIST_READER::TestFootprintsMatchingAndExchange()
break
;
break
;
}
}
}
}
if
(
cmp_info
==
NULL
)
// not found in netlist
if
(
cmp_info
==
NULL
)
// not found in netlist
continue
;
continue
;
...
@@ -296,9 +297,11 @@ int NETLIST_READER::SetPadsNetName( const wxString & aModule, const wxString & a
...
@@ -296,9 +297,11 @@ int NETLIST_READER::SetPadsNetName( const wxString & aModule, const wxString & a
int
padcount
=
0
;
int
padcount
=
0
;
MODULE
*
module
=
m_pcbframe
->
GetBoard
()
->
FindModuleByReference
(
aModule
);
MODULE
*
module
=
m_pcbframe
->
GetBoard
()
->
FindModuleByReference
(
aModule
);
if
(
module
)
if
(
module
)
{
{
D_PAD
*
pad
=
module
->
FindPadByName
(
aPadname
);
D_PAD
*
pad
=
module
->
FindPadByName
(
aPadname
);
if
(
pad
)
if
(
pad
)
{
{
padcount
++
;
padcount
++
;
...
@@ -316,6 +319,7 @@ int NETLIST_READER::SetPadsNetName( const wxString & aModule, const wxString & a
...
@@ -316,6 +319,7 @@ int NETLIST_READER::SetPadsNetName( const wxString & aModule, const wxString & a
}
}
return
padcount
;
return
padcount
;
}
}
if
(
m_messageWindow
)
if
(
m_messageWindow
)
{
{
wxString
msg
;
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 )
...
@@ -173,62 +173,104 @@ void NETLIST_READER_KICAD_PARSER::SkipCurrent() throw( IO_ERROR, PARSE_ERROR )
void
NETLIST_READER_KICAD_PARSER
::
Parse
(
BOARD
*
aBrd
)
void
NETLIST_READER_KICAD_PARSER
::
Parse
(
BOARD
*
aBrd
)
throw
(
IO_ERROR
,
PARSE_ERROR
)
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
)
while
(
(
token
=
NextTok
()
)
!=
T_EOF
)
{
{
if
(
token
==
T_LEFT
)
if
(
token
==
T_LEFT
)
token
=
NextTok
();
token
=
NextTok
();
if
(
token
==
T_components
)
switch
(
token
)
{
{
// The section comp starts here.
case
T_export
:
// The netlist starts here.
while
(
(
token
=
NextTok
()
)
!=
T_RIGHT
)
// nothing to do here,
{
// just increment the count of ')' to read and end of file
if
(
token
==
T_LEFT
)
plevel
++
;
token
=
NextTok
();
break
;
if
(
token
==
T_comp
)
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
if
(
token
==
T_LEFT
)
COMPONENT_INFO
*
cmp_info
=
ParseComp
();
token
=
NextTok
();
netlist_reader
->
AddModuleInfo
(
cmp_info
);
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
()
)
if
(
netlist_reader
->
BuildModuleListOnlyOpt
()
)
return
;
// at this point, the module list is read and built.
return
;
// at this point, the module list is read and built.
// Load new footprints
// Load new footprints
netlist_reader
->
InitializeModules
();
netlist_reader
->
InitializeModules
();
netlist_reader
->
TestFootprintsMatchingAndExchange
();
netlist_reader
->
TestFootprintsMatchingAndExchange
();
break
;
}
case
T_nets
:
// The section nets starts here.
if
(
token
==
T_nets
)
while
(
(
token
=
NextTok
()
)
!=
T_RIGHT
)
{
// The section nets starts here.
while
(
(
token
=
NextTok
()
)
!=
T_RIGHT
)
{
if
(
token
==
T_LEFT
)
token
=
NextTok
();
if
(
token
==
T_net
)
{
{
// A net section if found. Read it
if
(
token
==
T_LEFT
)
ParseNet
(
aBrd
);
token
=
NextTok
();
if
(
token
==
T_net
)
{
// A net section if found. Read it
ParseNet
(
aBrd
);
}
}
}
}
break
;
}
if
(
token
==
T_libparts
&&
netlist_reader
->
ReadLibpartSectionOpt
()
)
case
T_libparts
:
// The section libparts starts here.
{
if
(
netlist_reader
->
ReadLibpartSectionOpt
()
)
// The section libparts starts here.
while
(
(
token
=
NextTok
()
)
!=
T_RIGHT
)
{
if
(
token
==
T_LEFT
)
token
=
NextTok
();
if
(
token
==
T_libpart
)
{
{
// A libpart section if found. Read it
while
(
(
token
=
NextTok
()
)
!=
T_RIGHT
)
ParseKicadLibpartList
();
{
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
)
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