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
b9259f85
Commit
b9259f85
authored
Aug 02, 2007
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed g++ 4.1.2 compiler warnings, added USE_MATCH_LAYER build option
parent
9ae3184b
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
66 additions
and
36 deletions
+66
-36
copy_to_clipboard.cpp
common/copy_to_clipboard.cpp
+2
-2
plothpgl.cpp
eeschema/plothpgl.cpp
+1
-1
plotps.cpp
eeschema/plotps.cpp
+1
-1
libs.linux
libs.linux
+6
-0
class_module.h
pcbnew/class_module.h
+1
-1
clean.cpp
pcbnew/clean.cpp
+0
-4
dragsegm.cpp
pcbnew/dragsegm.cpp
+0
-1
gen_modules_placefile.cpp
pcbnew/gen_modules_placefile.cpp
+1
-1
hotkeys.cpp
pcbnew/hotkeys.cpp
+5
-1
locate.cpp
pcbnew/locate.cpp
+43
-19
muonde.cpp
pcbnew/muonde.cpp
+3
-2
onrightclick.cpp
pcbnew/onrightclick.cpp
+1
-1
zones.cpp
pcbnew/zones.cpp
+2
-2
No files found.
common/copy_to_clipboard.cpp
View file @
b9259f85
...
@@ -25,8 +25,8 @@
...
@@ -25,8 +25,8 @@
extern
BASE_SCREEN
*
ActiveScreen
;
extern
BASE_SCREEN
*
ActiveScreen
;
static
bool
s_PlotBlackAndWhite
=
FALSE
;
static
const
bool
s_PlotBlackAndWhite
=
FALSE
;
static
bool
Print_Sheet_Ref
=
TRUE
;
static
const
bool
Print_Sheet_Ref
=
TRUE
;
static
bool
DrawPage
(
WinEDA_DrawPanel
*
panel
);
static
bool
DrawPage
(
WinEDA_DrawPanel
*
panel
);
...
...
eeschema/plothpgl.cpp
View file @
b9259f85
...
@@ -501,7 +501,7 @@ int margin;
...
@@ -501,7 +501,7 @@ int margin;
/* Build the screen list */
/* Build the screen list */
EDA_ScreenList
ScreenList
(
NULL
);
EDA_ScreenList
ScreenList
(
NULL
);
if
(
Select_PlotAll
==
TRUE
)
screen
=
screen
=
ScreenList
.
GetFirst
();
if
(
Select_PlotAll
==
TRUE
)
screen
=
ScreenList
.
GetFirst
();
else
screen
=
ActiveScreen
;
else
screen
=
ActiveScreen
;
for
(
;
screen
!=
NULL
;
screen
=
ScreenList
.
GetNext
()
)
for
(
;
screen
!=
NULL
;
screen
=
ScreenList
.
GetNext
()
)
{
{
...
...
eeschema/plotps.cpp
View file @
b9259f85
...
@@ -329,7 +329,7 @@ wxPoint plot_offset;
...
@@ -329,7 +329,7 @@ wxPoint plot_offset;
/* Build the screen list */
/* Build the screen list */
EDA_ScreenList
ScreenList
(
NULL
);
EDA_ScreenList
ScreenList
(
NULL
);
if
(
AllPages
==
TRUE
)
screen
=
screen
=
ScreenList
.
GetFirst
();
if
(
AllPages
==
TRUE
)
screen
=
ScreenList
.
GetFirst
();
else
screen
=
ActiveScreen
;
else
screen
=
ActiveScreen
;
for
(
;
screen
!=
NULL
;
screen
=
ScreenList
.
GetNext
()
)
for
(
;
screen
!=
NULL
;
screen
=
ScreenList
.
GetNext
()
)
{
{
...
...
libs.linux
View file @
b9259f85
...
@@ -62,6 +62,12 @@ LDFLAGS = -s #-v
...
@@ -62,6 +62,12 @@ LDFLAGS = -s #-v
endif
endif
# a command line define which affects pcbnew only, causing it to match current layer
ifdef USE_MATCH_LAYER
CPPFLAGS += -DUSE_MATCH_LAYER
endif
# You must comment or uncomment this line to disable/enable python support
# You must comment or uncomment this line to disable/enable python support
#KICAD_PYTHON = 1
#KICAD_PYTHON = 1
...
...
pcbnew/class_module.h
View file @
b9259f85
...
@@ -60,7 +60,7 @@ public:
...
@@ -60,7 +60,7 @@ public:
wxSize
m_Ext
;
// marges de "garde": utilise en placement auto.
wxSize
m_Ext
;
// marges de "garde": utilise en placement auto.
float
m_Surface
;
// surface du rectangle d'encadrement
float
m_Surface
;
// surface du rectangle d'encadrement
long
m_Link
;
// variable temporaire ( pour editions, ...)
unsigned
long
m_Link
;
// variable temporaire ( pour editions, ...)
long
m_LastEdit_Time
;
// Date de la derniere modification du module (gestion de librairies)
long
m_LastEdit_Time
;
// Date de la derniere modification du module (gestion de librairies)
wxString
m_Doc
;
// Texte de description du module
wxString
m_Doc
;
// Texte de description du module
...
...
pcbnew/clean.cpp
View file @
b9259f85
...
@@ -22,10 +22,6 @@
...
@@ -22,10 +22,6 @@
#define POS_AFF_NUMSEGM 70
#define POS_AFF_NUMSEGM 70
/* Routines locales : */
/* Routines locales : */
#if 0
static void ConnectDanglingEndToPad(WinEDA_PcbFrame * frame);
static void Gen_Raccord_Track(WinEDA_PcbFrame * frame, wxDC * DC);
#endif
static
int
clean_segments
(
WinEDA_PcbFrame
*
frame
,
wxDC
*
DC
);
static
int
clean_segments
(
WinEDA_PcbFrame
*
frame
,
wxDC
*
DC
);
static
void
suppression_piste_non_connectee
(
WinEDA_PcbFrame
*
frame
,
wxDC
*
DC
);
static
void
suppression_piste_non_connectee
(
WinEDA_PcbFrame
*
frame
,
wxDC
*
DC
);
static
TRACK
*
AlignSegment
(
BOARD
*
Pcb
,
TRACK
*
pt_ref
,
TRACK
*
pt_segm
,
int
extremite
);
static
TRACK
*
AlignSegment
(
BOARD
*
Pcb
,
TRACK
*
pt_ref
,
TRACK
*
pt_segm
,
int
extremite
);
...
...
pcbnew/dragsegm.cpp
View file @
b9259f85
...
@@ -109,7 +109,6 @@ void Build_1_Pad_SegmentsToDrag(WinEDA_DrawPanel * panel, wxDC * DC, D_PAD * PtP
...
@@ -109,7 +109,6 @@ void Build_1_Pad_SegmentsToDrag(WinEDA_DrawPanel * panel, wxDC * DC, D_PAD * PtP
*/
*/
{
{
TRACK
*
Track
;
TRACK
*
Track
;
DRAG_SEGM
*
pt_drag
;
int
net_code
=
PtPad
->
m_NetCode
;
int
net_code
=
PtPad
->
m_NetCode
;
int
MasqueLayer
;
int
MasqueLayer
;
wxPoint
pos
;
wxPoint
pos
;
...
...
pcbnew/gen_modules_placefile.cpp
View file @
b9259f85
...
@@ -342,7 +342,7 @@ char *layer_name[4] = {"??? ","copper","component","all"} ;
...
@@ -342,7 +342,7 @@ char *layer_name[4] = {"??? ","copper","component","all"} ;
fprintf
(
rptfile
,
"$EndPAD
\n
"
);
fprintf
(
rptfile
,
"$EndPAD
\n
"
);
}
}
fprintf
(
rptfile
,
"$EndMODULE %s
\n\n
"
,
Module
->
m_Reference
->
m_Text
.
GetData
()
);
fprintf
(
rptfile
,
"$EndMODULE %s
\n\n
"
,
(
const
char
*
)
Module
->
m_Reference
->
m_Text
.
GetData
()
);
}
}
/* Write board Edges */
/* Write board Edges */
...
...
pcbnew/hotkeys.cpp
View file @
b9259f85
...
@@ -147,7 +147,11 @@ sous le courseur souris
...
@@ -147,7 +147,11 @@ sous le courseur souris
if
(
ItemFree
)
if
(
ItemFree
)
{
{
module
=
Locate_Prefered_Module
(
m_Pcb
,
module
=
Locate_Prefered_Module
(
m_Pcb
,
CURSEUR_OFF_GRILLE
|
IGNORE_LOCKED
|
VISIBLE_ONLY
/*MATCH_LAYER */
);
CURSEUR_OFF_GRILLE
|
IGNORE_LOCKED
|
VISIBLE_ONLY
#if defined(USE_MATCH_LAYER)
|
MATCH_LAYER
#endif
);
if
(
module
==
NULL
)
// no footprint found
if
(
module
==
NULL
)
// no footprint found
{
{
module
=
Locate_Prefered_Module
(
m_Pcb
,
CURSEUR_OFF_GRILLE
);
module
=
Locate_Prefered_Module
(
m_Pcb
,
CURSEUR_OFF_GRILLE
);
...
...
pcbnew/locate.cpp
View file @
b9259f85
...
@@ -117,19 +117,25 @@ EDA_BaseStruct * item;
...
@@ -117,19 +117,25 @@ EDA_BaseStruct * item;
return
pt_texte_pcb
;
return
pt_texte_pcb
;
}
}
if
(
(
DrawSegm
=
Locate_Segment_Pcb
(
m_Pcb
,
LayerSearch
,
typeloc
))
!=
NULL
)
DrawSegm
=
Locate_Segment_Pcb
(
m_Pcb
,
LayerSearch
,
typeloc
);
if
(
DrawSegm
!=
NULL
)
{
{
Affiche_Infos_DrawSegment
(
this
,
DrawSegm
);
Affiche_Infos_DrawSegment
(
this
,
DrawSegm
);
return
DrawSegm
;
return
DrawSegm
;
}
}
if
(
(
item
=
Locate_Cotation
(
m_Pcb
,
LayerSearch
,
typeloc
))
!=
NULL
)
return
item
;
item
=
Locate_Cotation
(
m_Pcb
,
LayerSearch
,
typeloc
);
if
(
item
!=
NULL
)
return
item
;
if
(
(
item
=
Locate_MirePcb
(
m_Pcb
->
m_Drawings
,
LayerSearch
,
typeloc
))
!=
NULL
)
return
item
;
item
=
Locate_MirePcb
(
m_Pcb
->
m_Drawings
,
LayerSearch
,
typeloc
);
if
(
item
!=
NULL
)
return
item
;
/* Search for tracks and vias, with via priority */
/* Search for tracks and vias, with via priority */
if
(
LayerSearch
==
-
1
)
masque_layer
=
ALL_LAYERS
;
if
(
LayerSearch
==
-
1
)
masque_layer
=
ALL_LAYERS
;
else
masque_layer
=
g_TabOneLayerMask
[
LayerSearch
];
else
masque_layer
=
g_TabOneLayerMask
[
LayerSearch
];
Track
=
Locate_Pistes
(
m_Pcb
->
m_Track
,
masque_layer
,
typeloc
);
Track
=
Locate_Pistes
(
m_Pcb
->
m_Track
,
masque_layer
,
typeloc
);
if
(
Track
!=
NULL
)
if
(
Track
!=
NULL
)
{
{
...
@@ -146,7 +152,6 @@ EDA_BaseStruct * item;
...
@@ -146,7 +152,6 @@ EDA_BaseStruct * item;
return
Track
;
return
Track
;
}
}
/* Search for Pads */
/* Search for Pads */
if
(
(
pt_pad
=
Locate_Any_Pad
(
m_Pcb
,
typeloc
))
!=
NULL
)
if
(
(
pt_pad
=
Locate_Any_Pad
(
m_Pcb
,
typeloc
))
!=
NULL
)
{
{
...
@@ -157,13 +162,16 @@ EDA_BaseStruct * item;
...
@@ -157,13 +162,16 @@ EDA_BaseStruct * item;
// First search: locate texts for footprints on copper or component layer
// First search: locate texts for footprints on copper or component layer
// Priority to the active layer (component or copper.
// Priority to the active layer (component or copper.
// this is useful for small smd components when 2 texts overlap but are not on the same layer
// this is useful for small smd components when 2 texts overlap but are not on the same layer
if
(
(
LayerSearch
==
LAYER_CUIVRE_N
)
||
(
LayerSearch
==
CMP_N
)
)
if
(
LayerSearch
==
LAYER_CUIVRE_N
||
LayerSearch
==
CMP_N
)
{
{
for
(
module
=
m_Pcb
->
m_Modules
;
module
!=
NULL
;
module
=
(
MODULE
*
)
module
->
Pnext
)
for
(
module
=
m_Pcb
->
m_Modules
;
module
!=
NULL
;
module
=
(
MODULE
*
)
module
->
Pnext
)
{
{
TEXTE_MODULE
*
pt_texte
;
TEXTE_MODULE
*
pt_texte
;
if
(
module
->
m_Layer
!=
LayerSearch
)
continue
;
pt_texte
=
LocateTexteModule
(
m_Pcb
,
&
module
,
typeloc
|
VISIBLE_ONLY
);
if
(
module
->
m_Layer
!=
LayerSearch
)
continue
;
pt_texte
=
LocateTexteModule
(
m_Pcb
,
&
module
,
typeloc
|
VISIBLE_ONLY
);
if
(
pt_texte
!=
NULL
)
if
(
pt_texte
!=
NULL
)
{
{
Affiche_Infos_E_Texte
(
this
,
module
,
pt_texte
);
Affiche_Infos_E_Texte
(
this
,
module
,
pt_texte
);
...
@@ -176,7 +184,7 @@ EDA_BaseStruct * item;
...
@@ -176,7 +184,7 @@ EDA_BaseStruct * item;
module
=
NULL
;
module
=
NULL
;
{
{
TEXTE_MODULE
*
pt_texte
;
TEXTE_MODULE
*
pt_texte
;
pt_texte
=
LocateTexteModule
(
m_Pcb
,
&
module
,
typeloc
|
VISIBLE_ONLY
);
pt_texte
=
LocateTexteModule
(
m_Pcb
,
&
module
,
typeloc
|
VISIBLE_ONLY
);
if
(
pt_texte
!=
NULL
)
if
(
pt_texte
!=
NULL
)
{
{
Affiche_Infos_E_Texte
(
this
,
module
,
pt_texte
);
Affiche_Infos_E_Texte
(
this
,
module
,
pt_texte
);
...
@@ -185,7 +193,8 @@ EDA_BaseStruct * item;
...
@@ -185,7 +193,8 @@ EDA_BaseStruct * item;
}
}
/* Search for a footprint */
/* Search for a footprint */
if
(
(
module
=
Locate_Prefered_Module
(
m_Pcb
,
typeloc
|
VISIBLE_ONLY
))
!=
NULL
)
module
=
Locate_Prefered_Module
(
m_Pcb
,
typeloc
|
VISIBLE_ONLY
);
if
(
module
!=
NULL
)
{
{
module
->
Display_Infos
(
this
);
module
->
Display_Infos
(
this
);
return
module
;
return
module
;
...
@@ -195,7 +204,8 @@ EDA_BaseStruct * item;
...
@@ -195,7 +204,8 @@ EDA_BaseStruct * item;
if
(
(
TrackLocate
=
Locate_Zone
((
TRACK
*
)
m_Pcb
->
m_Zone
,
if
(
(
TrackLocate
=
Locate_Zone
((
TRACK
*
)
m_Pcb
->
m_Zone
,
GetScreen
()
->
m_Active_Layer
,
typeloc
))
!=
NULL
)
GetScreen
()
->
m_Active_Layer
,
typeloc
))
!=
NULL
)
{
{
Affiche_Infos_Piste
(
this
,
TrackLocate
)
;
return
TrackLocate
;
Affiche_Infos_Piste
(
this
,
TrackLocate
);
return
TrackLocate
;
}
}
MsgPanel
->
EraseMsgBox
();
MsgPanel
->
EraseMsgBox
();
...
@@ -756,22 +766,36 @@ wxPoint ref_pos;
...
@@ -756,22 +766,36 @@ wxPoint ref_pos;
}
}
for
(
;
module
!=
NULL
;
module
=
(
MODULE
*
)
module
->
Pnext
)
for
(
;
module
!=
NULL
;
module
=
(
MODULE
*
)
module
->
Pnext
)
{
if
(
(
typeloc
&
VISIBLE_ONLY
)
)
{
{
int
layer
=
module
->
m_Layer
;
int
layer
=
module
->
m_Layer
;
if
(
layer
==
ADHESIVE_N_CU
||
layer
==
SILKSCREEN_N_CU
)
layer
=
CUIVRE_N
;
if
(
layer
==
ADHESIVE_N_CU
||
layer
==
SILKSCREEN_N_CU
)
else
if
(
layer
==
ADHESIVE_N_CMP
||
layer
==
SILKSCREEN_N_CMP
)
layer
=
CMP_N
;
layer
=
CUIVRE_N
;
if
(
!
IsModuleLayerVisible
(
layer
)
)
continue
;
else
if
(
layer
==
ADHESIVE_N_CMP
||
layer
==
SILKSCREEN_N_CMP
)
layer
=
CMP_N
;
if
(
typeloc
&
VISIBLE_ONLY
)
{
if
(
!
IsModuleLayerVisible
(
layer
)
)
continue
;
}
if
(
typeloc
&
MATCH_LAYER
)
{
if
(
((
PCB_SCREEN
*
)
ActiveScreen
)
->
m_Active_Layer
!=
layer
)
continue
;
}
}
pt_txt_mod
=
module
->
m_Reference
;
pt_txt_mod
=
module
->
m_Reference
;
/* la souris est-elle dans le rectangle autour du texte*/
/* la souris est-elle dans le rectangle autour du texte*/
if
(
pt_txt_mod
->
Locate
(
ref_pos
)
)
if
(
pt_txt_mod
->
Locate
(
ref_pos
)
)
{
{
if
(
PtModule
)
*
PtModule
=
module
;
if
(
PtModule
)
*
PtModule
=
module
;
return
(
pt_txt_mod
);
return
(
pt_txt_mod
);
}
}
pt_txt_mod
=
module
->
m_Value
;
pt_txt_mod
=
module
->
m_Value
;
/* la souris est-elle dans le rectangle autour du texte*/
/* la souris est-elle dans le rectangle autour du texte*/
if
(
pt_txt_mod
->
Locate
(
ref_pos
)
)
if
(
pt_txt_mod
->
Locate
(
ref_pos
)
)
{
{
...
...
pcbnew/muonde.cpp
View file @
b9259f85
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
/* fonctions importees */
/* fonctions importees */
/* Fonctions locales */
/* Fonctions locales */
static
void
Exit_Muonde
(
WinEDA_DrawFrame
*
frame
,
wxDC
*
DC
);
//
static void Exit_Muonde(WinEDA_DrawFrame * frame, wxDC *DC);
/* Variables locales : */
/* Variables locales : */
#define COEFF_COUNT 6
#define COEFF_COUNT 6
...
@@ -87,7 +87,7 @@ wxString Line;
...
@@ -87,7 +87,7 @@ wxString Line;
}
}
#if 0
/**********************************************************/
/**********************************************************/
static void Exit_Muonde(WinEDA_DrawFrame * frame, wxDC *DC )
static void Exit_Muonde(WinEDA_DrawFrame * frame, wxDC *DC )
/**********************************************************/
/**********************************************************/
...
@@ -111,6 +111,7 @@ MODULE * Module = (MODULE*) frame->m_CurrentScreen->m_CurrentItem;
...
@@ -111,6 +111,7 @@ MODULE * Module = (MODULE*) frame->m_CurrentScreen->m_CurrentItem;
frame->DrawPanel->ForceCloseManageCurseur = NULL;
frame->DrawPanel->ForceCloseManageCurseur = NULL;
frame->m_CurrentScreen->m_CurrentItem = NULL;
frame->m_CurrentScreen->m_CurrentItem = NULL;
}
}
#endif
/***************************************************************************/
/***************************************************************************/
...
...
pcbnew/onrightclick.cpp
View file @
b9259f85
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#include "Delete_Line.xpm"
#include "Delete_Line.xpm"
#include "Delete_Track.xpm"
#include "Delete_Track.xpm"
#include "Move_Module.xpm"
#include "Move_Module.xpm"
#include "Move_Track_Segment.xpm"
//
#include "Move_Track_Segment.xpm"
#include "Drag_Track_Segment.xpm"
#include "Drag_Track_Segment.xpm"
#include "Drag_Segment_WithSlope.xpm"
#include "Drag_Segment_WithSlope.xpm"
#include "Drag_Module.xpm"
#include "Drag_Module.xpm"
...
...
pcbnew/zones.cpp
View file @
b9259f85
...
@@ -202,7 +202,7 @@ wxString title = _("Zone clearance value:") + ReturnUnitSymbol(g_UnitMetric);
...
@@ -202,7 +202,7 @@ wxString title = _("Zone clearance value:") + ReturnUnitSymbol(g_UnitMetric);
if
(
Zone_45_Only
)
m_OrientEdgesOpt
->
SetSelection
(
1
);
if
(
Zone_45_Only
)
m_OrientEdgesOpt
->
SetSelection
(
1
);
int
GridList
[
4
]
=
{
50
,
100
,
250
,
500
},
selection
=
0
;
int
GridList
[
4
]
=
{
50
,
100
,
250
,
500
},
selection
=
0
;
for
(
int
ii
=
0
;
ii
<
m_GridCtrl
->
GetCount
();
ii
++
)
for
(
unsigned
ii
=
0
;
ii
<
m_GridCtrl
->
GetCount
();
ii
++
)
{
{
wxString
msg
=
ReturnStringFromValue
(
g_UnitMetric
,
GridList
[
ii
],
m_Parent
->
m_InternalUnits
);
wxString
msg
=
ReturnStringFromValue
(
g_UnitMetric
,
GridList
[
ii
],
m_Parent
->
m_InternalUnits
);
m_GridCtrl
->
SetString
(
ii
,
msg
);
m_GridCtrl
->
SetString
(
ii
,
msg
);
...
@@ -857,7 +857,7 @@ wxString msg;
...
@@ -857,7 +857,7 @@ wxString msg;
if
(
(
cell
&
CELL_is_ZONE
)
)
if
(
(
cell
&
CELL_is_ZONE
)
)
{
{
if
(
(
cell
&
CELL_is_FRIEND
)
==
0
)
if
(
(
cell
&
CELL_is_FRIEND
)
==
0
)
AndCell
(
ii
,
jj
,
BOTTOM
,
~
(
CELL_is_FRIEND
|
CELL_is_ZONE
)
);
AndCell
(
ii
,
jj
,
BOTTOM
,
(
BoardCell
)
~
(
CELL_is_FRIEND
|
CELL_is_ZONE
)
);
}
}
}
}
}
}
...
...
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