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
7d08facb
Commit
7d08facb
authored
Oct 07, 2012
by
Wayne Stambaugh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert footpint library log functions to trace functions to reduce debug output.
parent
fdc7e9a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
kicad_plugin.cpp
pcbnew/kicad_plugin.cpp
+17
-6
loadcmp.cpp
pcbnew/loadcmp.cpp
+0
-5
No files found.
pcbnew/kicad_plugin.cpp
View file @
7d08facb
...
@@ -56,6 +56,12 @@ using namespace std;
...
@@ -56,6 +56,12 @@ using namespace std;
#define FMTIU BOARD_ITEM::FormatInternalUnits
#define FMTIU BOARD_ITEM::FormatInternalUnits
/**
* Definition for enabling and disabling footprint library trace output. See the
* wxWidgets documentation on useing the WXTRACE environment variable.
*/
static
const
wxString
traceFootprintLibrary
(
wxT
(
"KicadFootprintLib"
)
);
/**
/**
* Class FP_CACHE_ITEM
* Class FP_CACHE_ITEM
...
@@ -175,7 +181,8 @@ void FP_CACHE::Save()
...
@@ -175,7 +181,8 @@ void FP_CACHE::Save()
// Allow file output stream to go out of scope to close the file stream before
// Allow file output stream to go out of scope to close the file stream before
// renaming the file.
// renaming the file.
{
{
wxLogDebug
(
wxT
(
"Creating temporary library file %s"
),
GetChars
(
tempFileName
)
);
wxLogTrace
(
traceFootprintLibrary
,
wxT
(
"Creating temporary library file %s"
),
GetChars
(
tempFileName
)
);
wxFFileOutputStream
os
(
tempFileName
);
wxFFileOutputStream
os
(
tempFileName
);
...
@@ -280,14 +287,15 @@ bool FP_CACHE::IsModified()
...
@@ -280,14 +287,15 @@ bool FP_CACHE::IsModified()
if
(
!
fn
.
FileExists
()
)
if
(
!
fn
.
FileExists
()
)
{
{
wxLog
Debug
(
wxT
(
"Footprint cache file '%s' does not exist."
),
wxLog
Trace
(
traceFootprintLibrary
,
wxT
(
"Footprint cache file '%s' does not exist."
),
fn
.
GetFullPath
().
GetData
()
);
fn
.
GetFullPath
().
GetData
()
);
return
true
;
return
true
;
}
}
if
(
it
->
second
->
IsModified
()
)
if
(
it
->
second
->
IsModified
()
)
{
{
wxLogDebug
(
wxT
(
"Footprint cache file '%s' has been modified."
),
wxLogTrace
(
traceFootprintLibrary
,
wxT
(
"Footprint cache file '%s' has been modified."
),
fn
.
GetFullPath
().
GetData
()
);
fn
.
GetFullPath
().
GetData
()
);
return
true
;
return
true
;
}
}
...
@@ -1581,7 +1589,8 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri
...
@@ -1581,7 +1589,8 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri
if
(
it
!=
mods
.
end
()
)
if
(
it
!=
mods
.
end
()
)
{
{
wxLogDebug
(
wxT
(
"Removing footprint library file '%s'."
),
fn
.
GetFullPath
().
GetData
()
);
wxLogTrace
(
traceFootprintLibrary
,
wxT
(
"Removing footprint library file '%s'."
),
fn
.
GetFullPath
().
GetData
()
);
mods
.
erase
(
footprintName
);
mods
.
erase
(
footprintName
);
wxRemoveFile
(
fn
.
GetFullPath
()
);
wxRemoveFile
(
fn
.
GetFullPath
()
);
}
}
...
@@ -1598,7 +1607,8 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri
...
@@ -1598,7 +1607,8 @@ void PCB_IO::FootprintSave( const wxString& aLibraryPath, const MODULE* aFootpri
if
(
module
->
GetLayer
()
!=
LAYER_N_FRONT
)
if
(
module
->
GetLayer
()
!=
LAYER_N_FRONT
)
module
->
Flip
(
module
->
GetPosition
()
);
module
->
Flip
(
module
->
GetPosition
()
);
wxLogDebug
(
wxT
(
"Creating s-expression footprint file: %s."
),
fn
.
GetFullPath
().
GetData
()
);
wxLogTrace
(
traceFootprintLibrary
,
wxT
(
"Creating s-expression footprint file: %s."
),
fn
.
GetFullPath
().
GetData
()
);
mods
.
insert
(
footprintName
,
new
FP_CACHE_ITEM
(
module
,
fn
)
);
mods
.
insert
(
footprintName
,
new
FP_CACHE_ITEM
(
module
,
fn
)
);
m_cache
->
Save
();
m_cache
->
Save
();
}
}
...
@@ -1689,7 +1699,8 @@ void PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES* aProp
...
@@ -1689,7 +1699,8 @@ void PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES* aProp
}
}
}
}
wxLogDebug
(
wxT
(
"Removing footprint library '%s'"
),
aLibraryPath
.
GetData
()
);
wxLogTrace
(
traceFootprintLibrary
,
wxT
(
"Removing footprint library '%s'"
),
aLibraryPath
.
GetData
()
);
// Some of the more elaborate wxRemoveFile() crap puts up its own wxLog dialog
// Some of the more elaborate wxRemoveFile() crap puts up its own wxLog dialog
// we don't want that. we want bare metal portability with no UI here.
// we don't want that. we want bare metal portability with no UI here.
...
...
pcbnew/loadcmp.cpp
View file @
7d08facb
...
@@ -562,8 +562,6 @@ void FOOTPRINT_EDIT_FRAME::OnSaveLibraryAs( wxCommandEvent& aEvent )
...
@@ -562,8 +562,6 @@ void FOOTPRINT_EDIT_FRAME::OnSaveLibraryAs( wxCommandEvent& aEvent )
wxArrayString
libNameList
;
wxArrayString
libNameList
;
wxLogDebug
(
wxT
(
"Loading legacy footprint library '%s'."
),
m_CurrentLib
.
GetData
()
);
wxFileName
libFileName
=
m_CurrentLib
;
wxFileName
libFileName
=
m_CurrentLib
;
libFileName
.
SetExt
(
FootprintLibFileExtension
);
libFileName
.
SetExt
(
FootprintLibFileExtension
);
...
@@ -579,9 +577,6 @@ void FOOTPRINT_EDIT_FRAME::OnSaveLibraryAs( wxCommandEvent& aEvent )
...
@@ -579,9 +577,6 @@ void FOOTPRINT_EDIT_FRAME::OnSaveLibraryAs( wxCommandEvent& aEvent )
fpInfoList
.
GetItem
(
i
).
m_Module
,
fpInfoList
.
GetItem
(
i
).
m_Module
,
true
,
false
);
true
,
false
);
wxLogDebug
(
wxT
(
"Saving footprint %s as s-expression to path %s"
),
module
->
GetLibRef
().
GetData
(),
path
.
GetData
()
);
pi
->
FootprintSave
(
path
,
module
);
pi
->
FootprintSave
(
path
,
module
);
}
}
}
}
...
...
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