Commit Graph

231 Commits

Author SHA1 Message Date
Jeff Young 5134856f18 Rationalise 3D settings data-structure.
Move the camera out to its own so that everything else is board-
related, and then rename BOARD_ADAPTER.

At some point the flags should probably be moved out too, and they
can have the EDA_3D_SETTINGS name.
2020-03-28 16:09:40 +00:00
Jeff Young d69ebfae49 Push tool framework base down into TOOL_HOLDER.
This allows us to use it outside of EDA_BASE_FRAMEs (in this case, in
PANEL_PREVIEW_3D.)
2020-03-24 19:00:25 +00:00
Jeff Young 93b7eacfb2 Fixup some Coverity issues. 2020-03-21 16:32:22 +00:00
jean-pierre charras 0f0b9bdf87 SIM_PLOT_FRAME_BASE: gives a minimal size for right panels.
On KDE, a too small size can hang wxWidgets.
2020-03-17 08:27:34 +01:00
jean-pierre charras b7cd0c54c2 Fix compil issues, especially on Windows:
Replace SEVERITY_ERROR by RPT_SEVERITY_ERROR to avoid collision with a system definition.
Replace other SEVERITY_XXX by RPT_SEVERITY_XX for consistency.
Fix compil warnings and some other compil issues.
2020-03-04 10:48:18 +01:00
Jeff Young 85c2e0d23a Add user-defined severities, exclusions and colors to DRC markers.
Exclusions are currently persisted in the project file.

Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-04 00:39:28 +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
jean-pierre charras 0e51ed32f9 ADDED: Sim plot panel: option to plot on a white background or a black background. 2020-02-01 18:20:18 +01:00
Ian McInerney 0d017e262c Update documentation and comment 2020-01-22 08:47:14 +00:00
Simon Richter f87dc08801 Readd <config.h> to ngspice.cpp
This file should really be included first from any source file, because it
contains platform specific workarounds.

This also groups includes a bit by source.
2020-01-22 08:38:45 +00:00
Jeff Young 384ff2539a Fix uninitialized variables. 2020-01-21 09:29:33 +00:00
Ian McInerney 00e58cd974 Fix unintialized values (from coverity scan) 2020-01-12 13:00:42 +00:00
Jonatan Liljedahl 4378290094 Fix menu string capitalization for simulator Dotted Current/Phase 2020-01-07 19:45:44 +00:00
Jonatan Liljedahl f433037dcd Eeschema: simulator: allow dotted traces for current and phase.
ADD: Allow drawing of current and phase traces with dotted style
for easier differentiation from voltage and magnitude. The option
is available in the View menu of the simulator.
2020-01-07 19:45:44 +00:00
Jonatan Liljedahl 90d2ea5dd5 Eeschema: simulator: add keyboard shortcuts for add signal, etc
(cherry picked from commit bc4caa8913ceff15391f6347a9edb8acbc60172e)
2019-12-11 04:34:22 +00:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
Seth Hillbrand b5f021ff9f Cleanup: Replace push_back with emplace_back
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -08:00
Jonatan Liljedahl 7c7d9c3e3f Eeschema: simulator plot: allow standard mac pan and pinch to zoom 2019-11-25 09:24:31 -05:00
jean-pierre charras c5290de6ec housekeeping:
Remove not used files:
- markdown2html is not used (we are using "Sundown" tool)
- newstroke_font_without_CJK.cpp is removed.
Due to code optimization the full font works fine without memory issues
-fix also a few very minor compil warnings
2019-11-16 09:39:36 +01:00
Jonatan Liljedahl fa14d5b9fa Eeschema: simulator: more trace colors, smarter color allocation
NEW: The simulator plot now avoids colors already in use, if possible.
The palette is replaced with a larger one with less saturated colors.

Fixes: lp:1851372
* https://bugs.launchpad.net/kicad/+bug/1851372
2019-11-11 17:20:56 +00:00
Sylwester Kocjan 1c01cc001d eeschema: fixed recognizing SPICE sim directive 2019-10-20 12:08:01 -07:00
Adam Wolf c7c49cee5a Add additional ngspice codemodel path for launching from standalone eeschema on macOS. 2019-10-04 13:41:50 -04:00
Jeff Young 67915b6a96 Add a warning message for attempting to current probe a subckt.
Fixes: lp:1843159
* https://bugs.launchpad.net/kicad/+bug/1843159
2019-09-12 14:45:01 +01:00
Jeff Young a25368cc6b Improve spelling.
The groundwork here is thanks to kunda1.

Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +01:00
Jeff Young 23d824de66 Simulator improvements.
1) Add highlighting to simProbe and simTune tools.
2) Probe tool should accept wires and pins, not wires and components.
3) Give simulator window a flat look to match rest of Kicad.
4) Collapse whitespace out of simulator window.
5) Add some error messages.
6) Add some whitespace to simulation setting dialog.
2019-08-05 16:48:18 -06:00
Jeff Young 97d70d7844 Fix cursor bugs in simulation.
1) cancel simProbe or simTune when simulator window closed
2) handle non-stock cursors through SetCurrentCursor()

Fixes: lp:1833583
* https://bugs.launchpad.net/kicad/+bug/1833583
2019-08-04 16:25:36 -06:00
Simon Richter 05353049b5 Pull in macro definition for strncasecmp on MSVC 2019-07-17 08:10:47 -04:00
jean-pierre charras d92396341e Simulation: do not add .save V(0) and/or .save V(GND) to ngspice.
These 2 nets are internally added by ngspice (info from Holger Vogt)
2019-07-07 17:55:43 +02:00
jean-pierre charras bc27b0ed5f Sim spice: fix unescaped netnames in spice netlist and simulator dialogs.
Net names in eeschema that include '/' are escaped ('/' replaced by "{slash}")
Escaped netnames are only for internal use, and must be unescaped in spice netlist and dialogs.
2019-06-09 17:48:01 +02:00
Jeff Young 568c8c336b Move DRC control to a tool; move assorted commands to ACTIONS. 2019-06-03 21:08:30 +01:00
Jeff Young 39b91c90dd Moved more operations to ACTIONs. 2019-06-01 23:03:24 +01:00
Jon Evans 5287ab6e4f Eeschema: improve simulator behavior for two-source DC analysis
Fixes: lp:1830478
* https://bugs.launchpad.net/kicad/+bug/1830478

(cherry picked from commit 356ccd0314)
2019-05-27 18:23:56 -04:00
jean-pierre charras 6cdde97e6f ngspice dll search: add auxiliary search paths on Linux, like on other platforms 2019-04-15 11:04:59 +02:00
jean-pierre charras 6d4fbcd5bb SIM_PLOT_FRAME_BASE: very minor fix. 2019-04-15 10:13:47 +02:00
jean-pierre charras ad5a1fd963 SIM_PLOT_FRAME: cosmetic enhancement: add icons in main menu.
Fix also Upeer/lower case issues in main menu strings.
2019-04-14 15:31:46 +02:00
Jeff Young d8cc2f8280 More cleanup from non-reference return from GetText(). 2019-04-03 19:35:25 +01:00
John Beard 6f1c3f5ef8 Eeschema: construct simulator cursors on demand
Statically constructing wxCursors as used for the probe
and tune cursors crashes the qa_eagle_plugin test
instantly.

Fix this by introducing a new class CURSOR_STORE,
which allows to abstract the platform wierdness of wxCursors
and allow the simulator to laziliy init its own cursors
at runtime.

This code isn't properly tested, as these cursors are never
actually used. However, it does allow the eeschema unit test
to run.

Fixes: lp:1781191
* https://bugs.launchpad.net/kicad/+bug/1781191
2019-04-02 18:26:33 +01:00
Maciej Suminski b445b0fab2 Link eeschema with ngspice DLL
Adds a link-time dependency for libngspice, so that other tools may
detect ngspice as a KiCad dependency.

The library is still loaded with dlopen() as it gives a way to reload it
in case of problems. The DLL name is recognized during CMake
configuration and used to load the library at runtime.
2018-10-30 08:32:38 +01:00
Stefan Brüns d1db2c7621 Use fixed version for libngspice.so.0
CanonicalizeName only adds the lib prefix and .so suffix, so loading
libngspice.so fails until the development package is installed.
MAC/Windows code paths lookup soversion 0 of ngspice as well, as this
is the only compatible version.
2018-10-27 10:20:09 +02:00
Maciej Suminski 85ef058458 Spice simulator: change gain units to dBV 2018-09-22 19:05:04 +02:00
jean-pierre charras e750382e75 Fix a few wxWidgets minor asserts 2018-07-29 17:27:11 +02:00
Jeff Young 7841f8a466 Unified preferences dialog framework.
(cherry picked from commit 8ee3e77)
2018-07-17 15:11:17 +01:00
Carsten Schoenert 9f7109826d fix misspelled 'allows to' -> 'allows one to'
Fixup small grammar issues around used 'allows to ...' almost in
code comments.
2018-07-11 10:35:03 -04:00
jean-pierre charras da392728d4 spice_value.cpp: replace std::invalid_argument by KI_PARAM_ERROR (replacement forgotten in commit a288d6199)
see commit a288d6199 for the reasons of this replacement.
2018-06-05 16:07:47 +02:00
jean-pierre charras a288d6199e Add KI_PARAM_ERROR, similar to std::invalid_argument but using wxString instead of std::string to throw errors.
std::invalid_argument does not work fine with translated strings as argument for message.
(the translated message is incorrectly or not displayed if it contains non ascii8 chars, at least on Windows).
KI_PARAM_ERROR can be throw-ed with a translatable/translated string (a wxString)
2018-06-05 13:29:51 +02:00
Wayne Stambaugh 7343e78347 Fix some Coverity uninitialized field warnings.
Fixes Coverity CIDs:

- 175824
- 169337
- 163191
- 175827
- 175440
- 175438
- 157136
2018-06-04 13:48:57 -04:00
Marco Ciampa 2cb65f9c19 Make the Simulator error strings translatable 2018-05-28 14:51:10 +02:00
Maciej Suminski 61597db12d Make the Simulator dialog strings translatable 2018-05-25 11:24:25 +02:00
Maciej Suminski 9960416e32 Spice simulator: plot currents in DC sweep simulation
Fixes: lp:1767457
* https://bugs.launchpad.net/kicad/+bug/1767457
2018-04-28 01:14:00 +02:00
Maciej Suminski 539d12b08f Spice simulator: more elegant approach to generating Spice device names
Code fixing Spice device names (prefixing reference with a character
corresponding to the assigned device model type) that was duplicated in
a few places has been moved to a function (NETLIST_EXPORTER_PSPICE::GetSpiceDevice()).
2018-04-28 01:14:00 +02:00