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
275f02ad
Commit
275f02ad
authored
Dec 03, 2012
by
Marco Mattila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix BOM-by-reference generator to print the separator character instead of the ascii code
parent
ac41e700
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
build_BOM.cpp
eeschema/build_BOM.cpp
+16
-16
No files found.
eeschema/build_BOM.cpp
View file @
275f02ad
...
@@ -471,25 +471,25 @@ bool BOM_LISTER::PrintComponentsListByReferenceCsvForm( FILE* aFile )
...
@@ -471,25 +471,25 @@ bool BOM_LISTER::PrintComponentsListByReferenceCsvForm( FILE* aFile )
// Print comment line:
// Print comment line:
msg
=
wxT
(
"ref"
);
msg
=
wxT
(
"ref"
);
msg
<<
m_separatorSymbol
<<
wxT
(
"value"
);
msg
<<
(
wxChar
)
m_separatorSymbol
<<
wxT
(
"value"
);
if
(
addDatasheet
)
if
(
addDatasheet
)
msg
<<
m_separatorSymbol
<<
wxT
(
"datasheet"
);
msg
<<
(
wxChar
)
m_separatorSymbol
<<
wxT
(
"datasheet"
);
if
(
printLocCmp
)
if
(
printLocCmp
)
msg
<<
m_separatorSymbol
<<
wxT
(
"sheet path(location)"
);
msg
<<
(
wxChar
)
m_separatorSymbol
<<
wxT
(
"sheet path(location)"
);
if
(
isFieldPrintable
(
FOOTPRINT
)
)
if
(
isFieldPrintable
(
FOOTPRINT
)
)
msg
<<
m_separatorSymbol
<<
wxT
(
"footprint"
);
msg
<<
(
wxChar
)
m_separatorSymbol
<<
wxT
(
"footprint"
);
for
(
int
ii
=
FIELD1
;
ii
<=
FIELD8
;
ii
++
)
for
(
int
ii
=
FIELD1
;
ii
<=
FIELD8
;
ii
++
)
{
{
if
(
isFieldPrintable
(
ii
)
)
if
(
isFieldPrintable
(
ii
)
)
msg
<<
m_separatorSymbol
<<
_
(
"Field"
)
<<
ii
-
FIELD1
+
1
;
msg
<<
(
wxChar
)
m_separatorSymbol
<<
_
(
"Field"
)
<<
ii
-
FIELD1
+
1
;
}
}
if
(
groupRefs
)
if
(
groupRefs
)
msg
<<
m_separatorSymbol
<<
_
(
"Item count"
);
msg
<<
(
wxChar
)
m_separatorSymbol
<<
_
(
"Item count"
);
fprintf
(
m_outFile
,
"%s
\n
"
,
TO_UTF8
(
msg
)
);
fprintf
(
m_outFile
,
"%s
\n
"
,
TO_UTF8
(
msg
)
);
...
@@ -531,19 +531,19 @@ bool BOM_LISTER::PrintComponentsListByReferenceCsvForm( FILE* aFile )
...
@@ -531,19 +531,19 @@ bool BOM_LISTER::PrintComponentsListByReferenceCsvForm( FILE* aFile )
{
{
// Store value and datasheet (will be printed later)
// Store value and datasheet (will be printed later)
strCur
.
Empty
();
strCur
.
Empty
();
strCur
<<
m_separatorSymbol
<<
comp
->
GetField
(
VALUE
)
->
m_Text
;
strCur
<<
(
wxChar
)
m_separatorSymbol
<<
comp
->
GetField
(
VALUE
)
->
m_Text
;
if
(
addDatasheet
)
if
(
addDatasheet
)
strCur
<<
m_separatorSymbol
<<
comp
->
GetField
(
DATASHEET
)
->
m_Text
;
strCur
<<
(
wxChar
)
m_separatorSymbol
<<
comp
->
GetField
(
DATASHEET
)
->
m_Text
;
}
}
else
else
{
{
// Print the current component reference, value and datasheet
// Print the current component reference, value and datasheet
msg
=
cmpName
;
msg
=
cmpName
;
msg
<<
m_separatorSymbol
<<
comp
->
GetField
(
VALUE
)
->
m_Text
;
msg
<<
(
wxChar
)
m_separatorSymbol
<<
comp
->
GetField
(
VALUE
)
->
m_Text
;
if
(
addDatasheet
)
if
(
addDatasheet
)
msg
<<
m_separatorSymbol
<<
comp
->
GetField
(
DATASHEET
)
->
m_Text
;
msg
<<
(
wxChar
)
m_separatorSymbol
<<
comp
->
GetField
(
DATASHEET
)
->
m_Text
;
fprintf
(
m_outFile
,
"%s"
,
TO_UTF8
(
msg
)
);
fprintf
(
m_outFile
,
"%s"
,
TO_UTF8
(
msg
)
);
}
}
...
@@ -574,19 +574,19 @@ bool BOM_LISTER::PrintComponentsListByReferenceCsvForm( FILE* aFile )
...
@@ -574,19 +574,19 @@ bool BOM_LISTER::PrintComponentsListByReferenceCsvForm( FILE* aFile )
{
{
case
1
:
// One reference to print
case
1
:
// One reference to print
// format C103;47uF;CP6;;;1
// format C103;47uF;CP6;;;1
msg
<<
cmpNameFirst
<<
strPred
<<
m_separatorSymbol
<<
amount
;
msg
<<
cmpNameFirst
<<
strPred
<<
(
wxChar
)
m_separatorSymbol
<<
amount
;
break
;
break
;
case
2
:
// 2 references to print
case
2
:
// 2 references to print
// format C103,C104;47uF;CP6;;;2
// format C103,C104;47uF;CP6;;;2
msg
<<
cmpNameFirst
<<
wxT
(
","
)
<<
cmpNameLast
msg
<<
cmpNameFirst
<<
wxT
(
","
)
<<
cmpNameLast
<<
strPred
<<
m_separatorSymbol
<<
amount
;
<<
strPred
<<
(
wxChar
)
m_separatorSymbol
<<
amount
;
break
;
break
;
default
:
// Many references to print :
default
:
// Many references to print :
// format: C103..C106;47uF;CP6;;;4
// format: C103..C106;47uF;CP6;;;4
msg
<<
cmpNameFirst
<<
wxT
(
".."
)
<<
cmpNameLast
msg
<<
cmpNameFirst
<<
wxT
(
".."
)
<<
cmpNameLast
<<
strPred
<<
m_separatorSymbol
<<
amount
;
<<
strPred
<<
(
wxChar
)
m_separatorSymbol
<<
amount
;
break
;
break
;
}
}
fprintf
(
m_outFile
,
"%s
\n
"
,
TO_UTF8
(
msg
)
);
fprintf
(
m_outFile
,
"%s
\n
"
,
TO_UTF8
(
msg
)
);
...
@@ -614,17 +614,17 @@ bool BOM_LISTER::PrintComponentsListByReferenceCsvForm( FILE* aFile )
...
@@ -614,17 +614,17 @@ bool BOM_LISTER::PrintComponentsListByReferenceCsvForm( FILE* aFile )
switch
(
amount
)
switch
(
amount
)
{
{
case
1
:
case
1
:
msg
<<
cmpNameFirst
<<
strPred
<<
m_separatorSymbol
<<
amount
;
msg
<<
cmpNameFirst
<<
strPred
<<
(
wxChar
)
m_separatorSymbol
<<
amount
;
break
;
break
;
case
2
:
case
2
:
msg
<<
cmpNameFirst
<<
wxT
(
","
)
<<
cmpNameLast
msg
<<
cmpNameFirst
<<
wxT
(
","
)
<<
cmpNameLast
<<
strPred
<<
m_separatorSymbol
<<
amount
;
<<
strPred
<<
(
wxChar
)
m_separatorSymbol
<<
amount
;
break
;
break
;
default
:
default
:
msg
<<
cmpNameFirst
<<
wxT
(
".."
)
<<
cmpNameFirst
<<
cmpNameLast
msg
<<
cmpNameFirst
<<
wxT
(
".."
)
<<
cmpNameFirst
<<
cmpNameLast
<<
strPred
<<
m_separatorSymbol
<<
amount
;
<<
strPred
<<
(
wxChar
)
m_separatorSymbol
<<
amount
;
break
;
break
;
}
}
fprintf
(
m_outFile
,
"%s
\n
"
,
TO_UTF8
(
msg
)
);
fprintf
(
m_outFile
,
"%s
\n
"
,
TO_UTF8
(
msg
)
);
...
...
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