Commit Graph

189 Commits

Author SHA1 Message Date
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
jean-pierre charras 502bed083d Fix a minimal size for the spice simulator frame.
For an obscure reason, the minimal frame size fixed in EDA_BASE_FRAME was not working.
2018-04-27 20:35:23 +02:00
jean-pierre charras a9dd5b5335 Sim spice fix: the frame size was not the last stored size (like for other frames) but a default fixed value.
The frame size (and its subframes) is now the last used.
2018-04-27 18:33:13 +02:00
Maciej Suminski e3a06dca70 Fallback to system ngspice library when libngspice is not found in other paths on macOS 2018-04-19 14:48:31 +02:00
Maciej Suminski 4526f40fe1 ngspice: add extra paths to search for libngspice
The main purpose of the patch is to load libngspice from macOS bundle.
There are also some additional paths that could make Windows developers
easier.

Fixes: lp:1630675
* https://bugs.launchpad.net/kicad/+bug/1630675
2018-04-19 11:43:29 +02:00
Maciej Suminski a8ef222517 ngspice: keep the ngspice DLL handle as an automatic variable 2018-04-19 11:44:48 +02:00
Maciej Suminski cb2c447c23 Spice Simulator: add close buttons to plot tabs
Fixes: lp:1761902
* https://bugs.launchpad.net/kicad/+bug/1761902
2018-04-07 22:53:50 +02:00
Maciej Suminski 058f2bffd0 Spice simulator: safety check 2018-03-22 18:20:02 +01:00
Maciej Suminski bad462a228 Spice simulator: reload ngSpice dll on error
ngSpice frequently ends up a simulation with an error:
"Error: ngspice.dll cannot recover and awaits to be detached"
The only way forward is to reload the shared library and
reinitialize ngSpice.

Fixes: lp:1753101
* https://bugs.launchpad.net/kicad/+bug/1753101
2018-03-21 18:01:38 +01:00
Maciej Suminski 61e42ba392 Spice simulator: changed NGSPICE instance type to shared_ptr
It was yet another time when I tried to free a singleton pointer.
Let's make clear it is not meant to be freed manually.
2018-03-21 18:01:38 +01:00
Maciej Suminski 50053e7f27 Spice simulator: code formatting 2018-03-21 18:01:38 +01:00
Maciej Suminski 33620ecc85 Revert "libngspice is linked at compile time"
This reverts commit 75f8b20493.
In case of problems, ngspice demands to be detached which is not
possible when it is linked at compile time.
2018-03-21 18:01:38 +01:00
Tomasz Włostowski 919b449595 Added 'show spice netlist' menu option in the simulator
Fixes: lp:1745887
* https://bugs.launchpad.net/kicad/+bug/1745887
2018-03-03 17:38:28 +01:00
jean-pierre charras af1281433b fix minor compil warning 2018-02-18 21:22:16 +01:00
Jeff Young b3884669cf Proper error reporting for Annotate dialog.
Also fixes:
- forcing the annotation scope to "full schematic" when run
  as a prerequisite to Generate Netlist.

- a long-standing bug where displaying extra items in a dialog
  would mess up the height of the HTML_REPORT_PANEL (becasue
  we were setting the html window's height rather than its
  parent flexgrid.

- initializing the annotation radio buttons to safe values
  (full schematic and keep existing)

Fixes: lp:1750062
* https://bugs.launchpad.net/kicad/+bug/1750062
2018-02-18 15:08:24 -05:00
Jeff Young 1afbfad44a Use "..." uniformly in menus.
See the bug report for some wording changes and a couple of
menu restructurings that were also cleaned up.

Fixes: lp:1597827
* https://bugs.launchpad.net/kicad/+bug/1597827
2018-02-10 17:32:28 -05:00
jean-pierre charras 8022f1cc01 fix code after renamin files 2018-01-30 11:49:51 +01:00
Chris Pavlina c5b2ad9595 simulator: DPI-independent default size 2018-01-06 22:23:58 -07:00
Dan Weatherill 0dcf95ee1a automatically add extension to sim workbook files
CHANGED: When a workbook file is saved from the simulation dialog
in eeschema, the extension is automatically added if it is not
specified. This behaviour is consistent with the workbook loading
dialog, which filters the filelist for only ".wbk" files with no
"all files" option.
2018-01-06 12:04:53 -05:00
Mark Roszko b98cc0b937 Some coverity fixes 2018-01-05 22:51:03 -07:00
Christian Jacobsen ff4829eee6 Added a validity check in SIM_PLOT_PANEL::IsGridShown()
Fixes: lp:1712086
* https://bugs.launchpad.net/kicad/+bug/1712086
2017-12-18 09:34:25 +01:00
Simon Richter a9ccf1161b Fix quotes in UI messages
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
2017-12-15 07:33:07 -05:00
Maciej Suminski 33cf082c41 Fixed library path resolution in Spice netlist exporter
SEARCH_STACK is a deprecated method for getting the list of paths where
one could look for a file. Instead it tries the project path and
environmental variables.
2017-11-19 11:38:57 +01:00
Wayne Stambaugh 652b969193 GTK+ file dialog wildcard improvements.
The GTK+ file dialog is case sensitive however it does support regular
expressions.  Most of the file dialog wildcards are lower case so only
files with the lower case extensions will show up in the file dialog.
This code adds a method to convert file extensions of any case to the
appropriate (sch -> [sS][cC][hH]) regular expression on GTK+ builds so
all file extension case combinations will show up in the file dialog.

A note to developers: make sure to add a file extension when setting
when setting the default file argument.  If you do don't set an
extension, the GTK+ file dialog will happily append the regular
expression as the file extension which is surely not what you want.

There are still a few known places (mostly gerbview) where there are
some complex wildcard code that has not been converted.

Fixes lp:1720542

https://bugs.launchpad.net/kicad/+bug/1720542
2017-11-11 19:32:26 -05:00
Wayne Stambaugh 36f6d4a1f4 Convert symbol library editor over to use symbol library table.
Simplify some of the library editing code.  There have been a few minor
changes in the behavior of the editor.  If the current symbol is deleted
from the library, the next symbol in the library is not loaded.  The
deleted symbol is cleared and the current symbol is empty.

Change component to symbol to align with the preferred terminology
discussed on the developer's mailing list.

Add separate update UI event for save library as to enable the menu entry
whenever a library is selected.

Change the select symbol list dialog to a single column using the LIB_ID
format LIB_NICKNAME:LIB_ITEM_NAME so that the selection can be parsed by
LIB_ID.

Add method to expand URI to LIB_TABLE_BASE.

Override wxApp::OnExceptionInMainLoop() in debug builds to make debugging
easier when an unhandled exception occurs in a wxUpdateUIEvent handler.

Change SCH_SCREENS::HasNoFullyDefinedLibIds() to return false when the
schematic has no symbols to prevent the remapping dialog from being run.

Use SCH_COMPONENT part reference when creating netlist rather than looking
up the library symbol.
2017-11-09 18:50:20 -05:00
Tomasz Włostowski b945d2a708 cleanup: replace CLASS_MIRE with CLASS_PCB_TARGET for naming clarity 2017-11-03 20:02:06 +01:00
jean-pierre charras 1466d0cee6 Fix a few doxygen warnings 2017-06-18 09:18:41 +02:00
Maciej Suminski 2018d48946 Fixed removal order in SIM_PLOT_PANEL::DeleteTrace() 2017-06-16 23:17:34 +02:00
Wayne Stambaugh 66e97fa905 Doxygen comment improvements.
Fix lots of Doxygen warnings.

Fix Doxygen comment for IO_MGR::FootprintEnumerate() which was recently
changed.
2017-06-13 19:47:46 -04:00
Chris Pavlina ef12f0bcbc Fix warning: shadowed wxWindow::IsShown in sim_plot_panel.h 2017-03-19 09:18:28 -04:00
Chris Pavlina bfa22c6ce8 Fix warning: uninitialized constant in sim_plot_panel.h 2017-03-19 09:18:23 -04:00
Maciej Suminski d7e1152aa3 Correct way of freeing memory in NGSPICE class
Strings created with strdup() should be deleted using free(), not
delete.
2017-03-01 13:56:24 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
jean-pierre charras 54c5f6bbb0 Simulator frame: fix a min size for panels, and now stores in config the position and size of the frame and panels 2016-12-02 15:34:23 +01:00
Marco Inacio c6cbc9ec95 Fixes: lp:1646224 (Simulation: small tune field)
https://bugs.launchpad.net/kicad/+bug/1646224
2016-12-02 08:58:01 +01:00
Maciej Suminski af3d5befa7 Solve codemodel libraries loading problem in ngspice
Fixes: lp:1630675
* https://bugs.launchpad.net/kicad/+bug/1630675
2016-10-17 10:11:27 +02:00
Maciej Suminski 26ee676278 Handle Spice_Netlist_Enabled attribute in Spice netlist exporter
Fixes: lp:1630502
* https://bugs.launchpad.net/kicad/+bug/1630502
2016-10-07 16:50:47 +02:00
jean-pierre charras 673b094b2b Fix a few missing override qualifiers and shadowed vars. 2016-09-27 10:58:05 +02:00
Maciej Suminski 9e587a1ea2 Fixed an assertion in SIM_PLOT_FRAME
wxListCtrl cannot have wxLC_REPORT and wxLC_SMALL_ICON enabled at the same time (Windows)
2016-09-22 18:27:56 +02:00
jean-pierre charras 0719f8d214 Fixes: lp:1624659 (fix some issues in countries which are not using a point as decimal separator)
https://bugs.launchpad.net/kicad/+bug/1624659
Small enhancement in dialog_spice_model_base.cpp: add comments about spice values notation.
2016-09-17 18:34:44 +02:00
jean-pierre charras 48f916bd63 Kicad manger: add .cir netlist files to the list of files to show in project tree.
Simulator: open/save worbook file dialog: the dialog opens the current project folder by default.
2016-09-17 09:34:16 +02:00
jean-pierre charras cd94da7972 Spice simulator and netlist generation: use only netnames (outdated option "use net numbers as net names removed" removed)
netlist generation: remove option "replace IC and U ref by X" (broken option).
All component refs are now prefixed by the Spice_Primitive field value.
Therefore the netlist used by Kicad ngsipce simulator and the spice netlist generated from dialog are the same.
(note: like previously, forbidden chars like ( and ) are replaced by _ in netnames)
2016-09-16 20:36:19 +02:00
Maciej Suminski fcedef836a Revert "Do not use double component primitives in Spice netlist exporter"
This commit creates more issues than resolves. It could happen that
there are components with different reference types (e.g. U1 and IC1)
that would be later converted to X1, causing a conflict.
2016-08-31 11:51:17 +02:00