Commit Graph

118 Commits

Author SHA1 Message Date
Jon Evans bdb18022c0 Flag all dangling labels, not just isolated ones
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1788
2020-10-04 17:13:42 -04:00
Seth Hillbrand 02a5d47de9 Avoid passing references in EESchema
This returns the connection list by value.  This allows easier Python
use

Also renames m_End() to GetEnd()
2020-09-08 06:29:27 -07:00
Jon Evans be0aad5984 Move similar labels check to new connectivity engine 2020-08-30 15:43:16 -04:00
Jon Evans 48d7c46a53 Move pin table checks to new connectivity system 2020-08-30 15:43:16 -04:00
Jon Evans 1d2838bd92 Fix overzealous driver check that was causing false positives 2020-08-25 21:54:14 -04:00
Jon Evans d40ae3de46 ADDED: ERC check for missing hier labels for sheet ports
A subsheet may have more than one instance of a hier label,
but it's generally a mistake if there is no matching hier label
for a port on the parent sheet.

This is harder to do today now that we don't have manual tool
for placing hier ports, but it's still possible if you place
ports but then rename the label on the subsheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3468
2020-08-25 21:52:52 -04:00
Jon Evans 45cae6405d Improve no-connect ERC and check for floating wires
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2393
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2038
2020-08-25 18:00:16 -04:00
Jeff Young 97c34e2516 ADDED alternate pin definitions and assignments.
Fixes https://gitlab.com/kicad/code/kicad/issues/2002
2020-08-21 18:29:36 +01:00
Tomasz Wlostowski d937fadd6f Migrate RC_ITEM to use shared_ptr 2020-08-13 14:50:59 +02:00
Jon Evans 9a801d8b72 Don't disrupt diff pairs when auto-renaming buses
With bus groups we can use the prefix to disambiguate

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4916
2020-07-20 20:41:56 -04:00
Jon Evans 66bdd37637 Connectivity optimizations
Cache names of potential driving items
Change a few data structures based on profiling
2020-07-09 18:14:37 -04:00
Jon Evans 282fcd5f3c Connectivity optimizations
Don't copy the recursion test cache when copy-constructing
SCH_SHEET_PATHs as it's not needed in connectivity

Fix a few places that were copying unnecessarily
2020-07-08 17:42:12 -04:00
Jon Evans 23ce2d2e36 Re-add missing include 2020-07-06 19:47:07 -04:00
Jeff Young 3939b31027 Integration of netclasses into Eeschema.
This is mostly architecture, with the hookup of the Schematic Setup
dialog's Net Classes page.  Things like assigning to a net on the
canvas to follow.

Fixes https://gitlab.com/kicad/code/kicad/issues/2132

Fixes https://gitlab.com/kicad/code/kicad/issues/4581
2020-07-06 20:00:50 +01:00
Jon Evans 12b4a55ae8 Port Eeschema to new project settings
DRC/ERC error serialization changed to use explicit tokens
Old stored severities and ignored errors are discarded
2020-07-02 22:08:54 -04:00
Jon Evans 8a0277eb2e Fix null graph in some connections
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4747
2020-06-29 20:27:08 -04:00
Jon Evans 13baf548ca Ensure merged buses have all members 2020-05-25 17:35:26 -04:00
Jon Evans 82a2530863 Fix missing inits of graph in a few places
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4532
2020-05-24 19:17:01 -04:00
Jon Evans 1e69f592f6 Rework net highlighting to use connections instead of strings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1933
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3921
2020-05-24 10:46:05 -04:00
Jon Evans 48ab1d1a93 Set sheet pins to bus color if they are a bus in the child sheet
As a visual aid, we can peek into the child to see if a pin
represents a bus in the child (in the case of aliases etc
we might not be able to tell by the name of the pin).

Only do this if there isn't anything else driving a connection
onto the sheet pin in the parent sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2619
2020-05-23 23:57:10 -04:00
Jon Evans de9520d65e Finish porting netlisters to use CONNECTION_GRAPH 2020-05-23 12:45:24 -04:00
Jon Evans f4d7c323f5 Coverity fixes 2020-05-18 22:58:28 -04:00
Jon Evans d7bd4c9b04 Move Eeschema globals to new SCHEMATIC object
Set up a new lineage for SCH_ITEMS to get back to the SCHEMATIC
they live on: Items will all be parented to the SCH_SCREEN that
they are added to, and each SCH_SCREEN will point back to the
SCHEMATIC that it is part of.  Note that this hierarchy is not
the same as the actual schematic hierarchy, which continues to
be managed through SCH_SHEETs and SCH_SHEET_PATHS.
2020-05-18 13:04:56 -04:00
Ian McInerney 99dcadf7e6 Introduce new KI_FALLTHROUGH macro
Annotate purposeful fallthroughs in switch statements with the
KI_FALLTHROUGH macro.
2020-04-25 00:44:09 +01:00
Jeff Young e14e3faed6 Use resolved text for connections. 2020-04-24 22:17:45 +01:00
Jeff Young 1535c83b88 Lay some groundwork for adding distances to DRC errors.
modified:   eeschema/lib_rectangle.cpp
2020-04-24 14:46:22 +01:00
Jon Evans f7ebf2af5e Add separate color setting for bus junctions
Fix plotting and printing to use bus color when
connectivity detects that the junction is on a bus.

Fixes #4098
2020-04-22 21:55:48 -04:00
Jon Evans d7d1ea33ac Check for conflicts before promoting sheet pins to be strong drivers
Fixes https://gitlab.com/kicad/code/kicad/issues/4201
2020-04-19 19:13:24 -04:00
Seth Hillbrand ba8c3a5582 Reverting part of cee973dc04
Iterators are invalidated by vector reallocation.  We need to keep the
count in the loop in order to have a valid position in the vector

Fixes https://gitlab.com/kicad/code/kicad/issues/4073
2020-03-20 08:44:21 -07:00
jean-pierre charras 53dfcd84cb Fix missing include
Fixes #4058
https://gitlab.com/kicad/code/kicad/issues/4058
2020-03-16 19:09:35 +01:00
Jeff Young cee973dc04 Move ERC error reporting over to the new framework.
Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-16 11:06:15 +00:00
Jeff Young 437f888c25 Schematic Setup dialog.
Includes:
- moving some of the project settings from the Preferences dialog
- ERC severites
- project-specific field-name templates

Fixes https://gitlab.com/kicad/code/kicad/issues/2145
2020-03-10 18:54:17 +00:00
Jon Evans 1e104d5bd4 Don't promote globals from locals on a different sheet
Fixes #4004
2020-03-05 19:08:55 -05:00
Jeff Young 129042f8a6 Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
Jon Evans fe375b4419 Allow sheet pins to be strong drivers if they don't conflict with anything
Also try harder to match bus members in case one was renamed by a higher
priority label.

Fixes https://gitlab.com/kicad/code/kicad/issues/3797
2020-02-05 14:23:55 +00:00
Jon Evans ac875e26a8 Fix handling of SCH_PINs on multi-unit parts
Fixes https://gitlab.com/kicad/code/kicad/issues/3770
2020-02-04 11:51:29 +00:00
Jon Evans 41725e6b07 Sort nets in netlist by name; generate ordered net codes 2020-01-22 14:59:02 +00:00
Mark Roszko 70908043a3 Convert enums inside eeschema and the symbol editor to be scoped
Scope: NETLIST_ITEM, CONNECTION_TYPE, ELECTRICAL_PINTYPE,
       NET_CONNECTION, NETLIST_ITEM, GRAPHIC_PINSHAPE

Note, the pin type enum had PT_ added to the front to prevent
shadowing of the INPUT symbol on msys2 (see discussion at
c17c9960d8)
2020-01-18 20:51:28 +00:00
Jeff Young 836c1ea56e Fix a bunch of un-caught boost::bad_pointer exceptions.
This also removes vector cover types which do nothing except obfuscate
the underlying implementation.

Mainly changes SCH_SHEET_PINS and CONFIG_PARAM_ARRAY (which will soon
be replaced by Jon's new stuff).
2020-01-12 19:55:00 +00:00
Seth Hillbrand 6e5e453d0d Replace EESchema DLIST
This moves EESchema DLIST structures to rtree.  These changes are more
fundamental than the pcbnew changes from 9163ac543 888c01d11 d1877d7c1
and 961b22d60 as eeschema operations were more dependent on passing
drawing list references around with SCH_ITEM* objects.
2020-01-10 06:37:08 -08:00
jean-pierre charras 03611f7bb7 missing change 2020-01-09 09:14:04 +01:00
jean-pierre charras c17c9960d8 Eeschema: fix a colliding name between sch_text.h and a Windows/msys2 header.
"INPUT" declaration in sch_text.h generate *a lot of* compil warnings.
So it is replaced by PS_INPUT.
For consistency, others member of enum class PINSHEETLABEL_SHAPE are also renamed.
2020-01-09 08:52:30 +01:00
Mark Roszko ca34ade00c Make global labels have the same spin style as net/hierarchical labels
For legacy reasons, it stored left and right "spin" as flipped integers in the file format.
But the code handled the flip in multiple locations rather than just doing it on file io.
This change unifies the internal code and does the mapping in the file I/O.
2020-01-08 19:07:55 +00:00
Jon Evans b4cc28a5b6 Fix memory leaks in CONNECTION_GRAPH
Fixes #3692
2020-01-07 00:13:19 -05:00
Jon Evans 856decc29b Fix a few issues with bus member propagation to subsheets
Fixes #3728
2020-01-04 10:38:50 -05:00
Jon Evans 1bffe7f48b Ensure power pins win over bus member renaming
Also switch to a scoped enum for PRIORITY

Fixes https://gitlab.com/kicad/code/kicad/issues/3728
2020-01-02 22:09:15 -05:00
jean-pierre charras 034b87dec0 Eeschema: connection_graph.cpp: clear old pointers to avoid using outdated or deleted data.
m_connected_bus_item and m_connected_bus_items pointers were not cleared when
rebuilding connection data.
So in some cases these pointers were not updated, and created a crash
once the old data was no longer available (deleted)
2019-12-23 14:55:47 +01:00
jean-pierre charras 7b80b2dc7b Eeschema: fix a crash that sometimes happens with bus entries,
connected to the same point on a bus.
The pointers used in previous code could be null, but they were not tested.
The pointer validity is now tested.
2019-12-22 16:19:05 +01:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00