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
3017b617
Commit
3017b617
authored
Jan 15, 2014
by
Maciej Suminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added NETINFO_LIST::UNCONNECTED constant.
parent
78732f13
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
23 additions
and
17 deletions
+23
-17
class_board.cpp
pcbnew/class_board.cpp
+4
-4
class_netinfo.h
pcbnew/class_netinfo.h
+3
-0
class_netinfolist.cpp
pcbnew/class_netinfolist.cpp
+3
-0
class_track.cpp
pcbnew/class_track.cpp
+2
-2
connect.cpp
pcbnew/connect.cpp
+1
-1
eagle_plugin.cpp
pcbnew/eagle_plugin.cpp
+2
-2
legacy_plugin.cpp
pcbnew/legacy_plugin.cpp
+2
-2
pad_edition_functions.cpp
pcbnew/pad_edition_functions.cpp
+1
-1
pcb_parser.cpp
pcbnew/pcb_parser.cpp
+2
-2
ratsnest.cpp
pcbnew/ratsnest.cpp
+1
-1
xchgmod.cpp
pcbnew/xchgmod.cpp
+1
-1
zones_by_polygon.cpp
pcbnew/zones_by_polygon.cpp
+1
-1
No files found.
pcbnew/class_board.cpp
View file @
3017b617
...
...
@@ -1529,7 +1529,7 @@ int BOARD::SetAreasNetCodesFromNetNames( void )
{
if
(
!
GetArea
(
ii
)
->
IsOnCopperLayer
()
)
{
GetArea
(
ii
)
->
SetNet
(
0
);
GetArea
(
ii
)
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
continue
;
}
...
...
@@ -2546,7 +2546,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
}
if
(
!
aNetlist
.
IsDryRun
()
)
pad
->
SetNet
(
0
);
pad
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
}
}
else
// Footprint pad has a net.
...
...
@@ -2649,7 +2649,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
aReporter
->
Report
(
msg
);
}
previouspad
->
SetNet
(
0
);
previouspad
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
}
netname
=
pad
->
GetNetname
();
count
=
1
;
...
...
@@ -2662,7 +2662,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets,
// Examine last pad
if
(
pad
&&
count
==
1
)
pad
->
SetNet
(
0
);
pad
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
}
// Last step: Some tests:
...
...
pcbnew/class_netinfo.h
View file @
3017b617
...
...
@@ -199,6 +199,9 @@ public:
return
NULL
;
}
///> Constant that holds the unconnected net number
static
const
int
UNCONNECTED
;
#if defined(DEBUG)
void
Show
()
const
;
#endif
...
...
pcbnew/class_netinfolist.cpp
View file @
3017b617
...
...
@@ -162,3 +162,6 @@ void NETINFO_LIST::buildPadsFullList()
m_Parent
->
m_Status_Pcb
=
LISTE_PAD_OK
;
}
const
int
NETINFO_LIST
::
UNCONNECTED
=
0
;
pcbnew/class_track.cpp
View file @
3017b617
...
...
@@ -690,7 +690,7 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
if
(
aDC
->
LogicalToDeviceXRel
(
m_Width
)
<
MIN_TEXT_SIZE
)
return
;
if
(
GetNet
()
==
0
)
if
(
GetNet
()
==
NETINFO_LIST
::
UNCONNECTED
)
return
;
NETINFO_ITEM
*
net
=
(
(
BOARD
*
)
GetParent
()
)
->
FindNet
(
GetNet
()
);
...
...
@@ -952,7 +952,7 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* aDC, GR_DRAWMODE aDrawMode,
}
// Display the short netname:
if
(
GetNet
()
==
0
)
if
(
GetNet
()
==
NETINFO_LIST
::
UNCONNECTED
)
return
;
if
(
DisplayOpt
.
DisplayNetNamesMode
==
0
||
DisplayOpt
.
DisplayNetNamesMode
==
1
)
...
...
pcbnew/connect.cpp
View file @
3017b617
...
...
@@ -842,7 +842,7 @@ void PCB_BASE_FRAME::RecalculateAllTracksNetcode()
curr_track
->
end
=
NULL
;
curr_track
->
SetState
(
BUSY
|
IN_EDIT
|
BEGIN_ONPAD
|
END_ONPAD
,
false
);
curr_track
->
SetZoneSubNet
(
0
);
curr_track
->
SetNet
(
0
);
// net code = 0 means not connected
curr_track
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
}
// If no pad, reset pointers and netcode, and do nothing else
...
...
pcbnew/eagle_plugin.cpp
View file @
3017b617
...
...
@@ -1493,7 +1493,7 @@ void EAGLE_PLUGIN::loadPlain( CPTREE& aGraphics )
zone
->
SetTimeStamp
(
timeStamp
(
gr
->
second
)
);
zone
->
SetLayer
(
layer
);
zone
->
SetNet
(
0
);
zone
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
CPolyLine
::
HATCH_STYLE
outline_hatch
=
CPolyLine
::
DIAGONAL_EDGE
;
...
...
@@ -2550,7 +2550,7 @@ void EAGLE_PLUGIN::loadSignals( CPTREE& aSignals )
// KiCad does not support an unconnected zone with its own non-zero netcode,
// but only when assigned netcode = 0 w/o a name...
for
(
ZONES
::
iterator
it
=
zones
.
begin
();
it
!=
zones
.
end
();
++
it
)
(
*
it
)
->
SetNet
(
0
);
(
*
it
)
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
// therefore omit this signal/net.
}
...
...
pcbnew/legacy_plugin.cpp
View file @
3017b617
...
...
@@ -2421,7 +2421,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER()
// Ensure keepout does not have a net
// (which have no sense for a keepout zone)
if
(
zc
->
GetIsKeepout
()
)
zc
->
SetNet
(
0
);
zc
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
// should always occur, but who knows, a zone without two corners
// is no zone at all, it's a spot?
...
...
@@ -2431,7 +2431,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER()
if
(
!
zc
->
IsOnCopperLayer
()
)
{
zc
->
SetFillMode
(
0
);
zc
->
SetNet
(
0
);
zc
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
}
// Hatch here, after outlines corners are read
...
...
pcbnew/pad_edition_functions.cpp
View file @
3017b617
...
...
@@ -141,7 +141,7 @@ void PCB_BASE_FRAME::AddPad( MODULE* aModule, bool draw )
// Update the pad properties.
Import_Pad_Settings
(
pad
,
false
);
pad
->
SetNet
(
0
);
pad
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
pad
->
SetPosition
(
GetCrossHairPosition
()
);
...
...
pcbnew/pcb_parser.cpp
View file @
3017b617
...
...
@@ -2687,7 +2687,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR )
if
(
!
zone
->
IsOnCopperLayer
()
)
{
zone
->
SetFillMode
(
0
);
zone
->
SetNet
(
0
);
zone
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
}
// Set hatch here, after outlines corners are read
...
...
@@ -2699,7 +2699,7 @@ ZONE_CONTAINER* PCB_PARSER::parseZONE_CONTAINER() throw( IO_ERROR, PARSE_ERROR )
// Ensure keepout does not have a net (which have no sense for a keepout zone)
if
(
zone
->
GetIsKeepout
()
)
zone
->
SetNet
(
0
);
zone
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
return
zone
.
release
();
}
...
...
pcbnew/ratsnest.cpp
View file @
3017b617
...
...
@@ -540,7 +540,7 @@ void PCB_BASE_FRAME::build_ratsnest_module( MODULE* aModule )
// collect active pads of the module:
for
(
pad_ref
=
aModule
->
Pads
();
pad_ref
!=
NULL
;
pad_ref
=
pad_ref
->
Next
()
)
{
if
(
pad_ref
->
GetNet
()
==
0
)
if
(
pad_ref
->
GetNet
()
==
NETINFO_LIST
::
UNCONNECTED
)
continue
;
localPadList
.
push_back
(
pad_ref
);
...
...
pcbnew/xchgmod.cpp
View file @
3017b617
...
...
@@ -455,7 +455,7 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aOldModule,
// Update pad netnames ( when possible)
for
(
D_PAD
*
pad
=
aNewModule
->
Pads
();
pad
!=
NULL
;
pad
=
pad
->
Next
()
)
{
pad
->
SetNet
(
0
);
pad
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
D_PAD
*
old_pad
=
aOldModule
->
Pads
();
for
(
;
old_pad
!=
NULL
;
old_pad
=
old_pad
->
Next
()
)
...
...
pcbnew/zones_by_polygon.cpp
View file @
3017b617
...
...
@@ -577,7 +577,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
zoneInfo
.
SetIsKeepout
(
true
);
// Netcode and netname are irrelevant,
// so ensure they are cleared
zone
->
SetNet
(
0
);
zone
->
SetNet
(
NETINFO_LIST
::
UNCONNECTED
);
edited
=
InvokeKeepoutAreaEditor
(
this
,
&
zoneInfo
);
}
else
...
...
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