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
cd9da9dd
Commit
cd9da9dd
authored
Nov 27, 2013
by
jean-pierre charras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pcbnew: fix Bug #1255568 (relative to .pos file creation). Minor compil warnings fixes
parent
18dd5238
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
14 deletions
+23
-14
displlst.cpp
common/displlst.cpp
+1
-1
math_util.cpp
common/math/math_util.cpp
+1
-1
dialog_netlist.cpp
pcbnew/dialogs/dialog_netlist.cpp
+1
-1
gen_modules_placefile.cpp
pcbnew/gen_modules_placefile.cpp
+18
-9
pcb_arc.cpp
pcbnew/pcad2kicadpcb_plugin/pcb_arc.cpp
+2
-2
No files found.
common/displlst.cpp
View file @
cd9da9dd
...
@@ -203,7 +203,7 @@ void EDA_LIST_DIALOG::InsertItems( const std::vector< wxArrayString >& itemList,
...
@@ -203,7 +203,7 @@ void EDA_LIST_DIALOG::InsertItems( const std::vector< wxArrayString >& itemList,
for
(
unsigned
col
=
0
;
col
<
itemList
[
row
].
GetCount
();
col
++
)
for
(
unsigned
col
=
0
;
col
<
itemList
[
row
].
GetCount
();
col
++
)
{
{
long
itemIndex
;
long
itemIndex
=
0
;
if
(
col
==
0
)
if
(
col
==
0
)
{
{
...
...
common/math/math_util.cpp
View file @
cd9da9dd
...
@@ -68,7 +68,7 @@ int64_t rescale( int64_t aNumerator, int64_t aValue, int64_t aDenominator )
...
@@ -68,7 +68,7 @@ int64_t rescale( int64_t aNumerator, int64_t aValue, int64_t aDenominator )
a0
=
a0
*
b0
+
t1a
;
a0
=
a0
*
b0
+
t1a
;
a1
=
a1
*
b1
+
(
t1
>>
32
)
+
(
a0
<
t1a
);
a1
=
a1
*
b1
+
(
t1
>>
32
)
+
(
a0
<
t1a
);
a0
+=
r
;
a0
+=
r
;
a1
+=
(
(
uint64_t
)
a0
)
<
r
;
a1
+=
a0
<
(
uint64_t
)
r
;
for
(
i
=
63
;
i
>=
0
;
i
--
)
for
(
i
=
63
;
i
>=
0
;
i
--
)
{
{
...
...
pcbnew/dialogs/dialog_netlist.cpp
View file @
cd9da9dd
...
@@ -167,7 +167,7 @@ void DIALOG_NETLIST::OnReadNetlistFileClick( wxCommandEvent& event )
...
@@ -167,7 +167,7 @@ void DIALOG_NETLIST::OnReadNetlistFileClick( wxCommandEvent& event )
"sure you want to read the netlist?"
)
)
)
"sure you want to read the netlist?"
)
)
)
return
;
return
;
wxBusyCursor
busy
()
;
wxBusyCursor
busy
;
m_MessageWindow
->
Clear
();
m_MessageWindow
->
Clear
();
msg
.
Printf
(
_
(
"Reading netlist file
\"
%s
\"
.
\n
"
),
GetChars
(
netlistFileName
)
);
msg
.
Printf
(
_
(
"Reading netlist file
\"
%s
\"
.
\n
"
),
GetChars
(
netlistFileName
)
);
...
...
pcbnew/gen_modules_placefile.cpp
View file @
cd9da9dd
...
@@ -200,6 +200,15 @@ bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
...
@@ -200,6 +200,15 @@ bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
bool
singleFile
=
OneFileOnly
();
bool
singleFile
=
OneFileOnly
();
int
fullcount
=
0
;
int
fullcount
=
0
;
// Count the footprints to place, do not yet create a file
int
fpcount
=
m_parent
->
DoGenFootprintsPositionFile
(
wxEmptyString
,
UnitsMM
(),
ForceAllSmd
(),
2
);
if
(
fpcount
==
0
)
{
wxMessageBox
(
_
(
"No modules for automated placement."
)
);
return
false
;
}
fn
=
m_parent
->
GetBoard
()
->
GetFileName
();
fn
=
m_parent
->
GetBoard
()
->
GetFileName
();
fn
.
SetPath
(
GetOutputDirectory
()
);
fn
.
SetPath
(
GetOutputDirectory
()
);
frontLayerName
=
brd
->
GetLayerName
(
LAYER_N_FRONT
);
frontLayerName
=
brd
->
GetLayerName
(
LAYER_N_FRONT
);
...
@@ -208,18 +217,19 @@ bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
...
@@ -208,18 +217,19 @@ bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
// Create the the Front or Top side placement file,
// Create the the Front or Top side placement file,
// or the single file
// or the single file
int
side
=
1
;
int
side
=
1
;
if
(
singleFile
)
if
(
singleFile
)
{
{
side
=
2
;
side
=
2
;
fn
.
SetName
(
fn
.
GetName
()
+
wxT
(
"-"
)
+
wxT
(
"all"
)
);
fn
.
SetName
(
fn
.
GetName
()
+
wxT
(
"-"
)
+
wxT
(
"all"
)
);
}
}
else
else
fn
.
SetName
(
fn
.
GetName
()
+
wxT
(
"-"
)
+
frontLayerName
);
fn
.
SetName
(
fn
.
GetName
()
+
wxT
(
"-"
)
+
frontLayerName
);
fn
.
SetExt
(
FootprintPlaceFileExtension
);
fn
.
SetExt
(
FootprintPlaceFileExtension
);
int
fpcount
=
m_parent
->
DoGenFootprintsPositionFile
(
fn
.
GetFullPath
(),
UnitsMM
(),
fpcount
=
m_parent
->
DoGenFootprintsPositionFile
(
fn
.
GetFullPath
(),
UnitsMM
(),
ForceAllSmd
(),
side
);
ForceAllSmd
(),
side
);
if
(
fpcount
<
0
)
if
(
fpcount
<
0
)
{
{
msg
.
Printf
(
_
(
"Unable to create <%s>"
),
GetChars
(
fn
.
GetFullPath
()
)
);
msg
.
Printf
(
_
(
"Unable to create <%s>"
),
GetChars
(
fn
.
GetFullPath
()
)
);
...
@@ -228,12 +238,6 @@ bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
...
@@ -228,12 +238,6 @@ bool DIALOG_GEN_MODULE_POSITION::CreateFiles()
return
false
;
return
false
;
}
}
if
(
fpcount
==
0
)
{
wxMessageBox
(
_
(
"No modules for automated placement."
)
);
return
false
;
}
if
(
singleFile
)
if
(
singleFile
)
msg
.
Printf
(
_
(
"Place file: <%s>
\n
"
),
GetChars
(
fn
.
GetFullPath
()
)
);
msg
.
Printf
(
_
(
"Place file: <%s>
\n
"
),
GetChars
(
fn
.
GetFullPath
()
)
);
else
else
...
@@ -339,6 +343,8 @@ void PCB_EDIT_FRAME::GenFootprintsPositionFile( wxCommandEvent& event )
...
@@ -339,6 +343,8 @@ void PCB_EDIT_FRAME::GenFootprintsPositionFile( wxCommandEvent& event )
* aSide = 0 -> Back (bottom) side)
* aSide = 0 -> Back (bottom) side)
* aSide = 1 -> Front (top) side)
* aSide = 1 -> Front (top) side)
* aSide = 2 -> both sides
* aSide = 2 -> both sides
* if aFullFileName is empty, the file is not crated, only the
* count of footprints to place is returned
*
*
* The format is:
* The format is:
* ### Module positions - created on 04/12/2012 15:24:24 ###
* ### Module positions - created on 04/12/2012 15:24:24 ###
...
@@ -405,6 +411,9 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName,
...
@@ -405,6 +411,9 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName,
moduleCount
++
;
moduleCount
++
;
}
}
if
(
aFullFileName
.
IsEmpty
()
)
return
moduleCount
;
FILE
*
file
=
wxFopen
(
aFullFileName
,
wxT
(
"wt"
)
);
FILE
*
file
=
wxFopen
(
aFullFileName
,
wxT
(
"wt"
)
);
if
(
file
==
NULL
)
if
(
file
==
NULL
)
return
-
1
;
return
-
1
;
...
...
pcbnew/pcad2kicadpcb_plugin/pcb_arc.cpp
View file @
cd9da9dd
...
@@ -60,8 +60,8 @@ void PCB_ARC::Parse( XNODE* aNode,
...
@@ -60,8 +60,8 @@ void PCB_ARC::Parse( XNODE* aNode,
XNODE
*
lNode
;
XNODE
*
lNode
;
double
a
=
0.0
;
double
a
=
0.0
;
int
r
=
0
;
int
r
=
0
;
int
endX
;
int
endX
=
0
;
int
endY
;
int
endY
=
0
;
m_PCadLayer
=
aLayer
;
m_PCadLayer
=
aLayer
;
m_KiCadLayer
=
GetKiCadLayer
();
m_KiCadLayer
=
GetKiCadLayer
();
...
...
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