Commit Graph

193 Commits

Author SHA1 Message Date
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
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
Chris Pavlina ef12f0bcbc Fix warning: shadowed wxWindow::IsShown in sim_plot_panel.h 2017-03-19 09:18:28 -04: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
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
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
Maciej Suminski 81e015036e Fixes for drawing color labels in simulator's signal list 2016-08-30 14:25:59 +02:00
Maciej Suminski 67573f15be Do not use double component primitives in Spice netlist exporter
Fixes: lp:1617768
* https://bugs.launchpad.net/kicad/+bug/1617768
2016-08-30 14:25:56 +02:00
jp-charras 26b1c732de Simulator: add simulator icon, and colored icons to identify more easily traces in trace list and cursor list. 2016-08-29 11:39:54 +02:00
jean-pierre charras 7e3aedda82 Slightly modify the way DIALOG_SIM_SETTINGS m_settingsDlg is created in SIM_PLOT_FRAME frame: for an obscure reason, if it is created in ctor SIM_PLOT_FRAME, m_settingsDlg has an annoying issue on Windows: when shown, the parent SIM_PLOT_FRAME is sent to the background. When created outside the ctor, this issue is gone. 2016-08-20 19:51:33 +02:00
jean-pierre charras 2456db3817 Simulator: Make a few strings translatable. 2016-08-20 17:37:51 +02:00
Maciej Suminski 42f6cf33a1 Unbind REPORTER from NGSPICE before deleting 2016-08-19 16:39:46 +02:00
Maciej Suminski fe30985742 Do not delete the NGSPICE singleton 2016-08-19 16:33:31 +02:00
Maciej Suminski 2a6b8f153b NGSPICE as a singleton
One cannot call ngSpice_Init() twice without unloading the dll. When calling
ngSpice_Init, we pass a pointer to a NGSPICE instance and thus it cannot be changed.
When any of the callback function is called with a stale pointer everything crashes.
2016-08-19 15:51:19 +02:00
jean-pierre charras 6e5628ceaf Avoid simulator crash if the simulation was not run, when using most of main menu commands, due to a null pointer not tested. 2016-08-12 15:36:43 +02:00
Maciej Suminski 0cb1e80e00 Activate eeschema on tune/probe 2016-08-11 14:42:19 +02:00
Maciej Suminski dfb5c6bfdd Do not update values if simulation is rerun Otherwise sometimes the signal list might be cleared and a new list is not yet available, resulting in loss of signals and cursors. 2016-08-11 14:42:19 +02:00
Maciej Suminski d15eef06f9 Removed redundant debugging info 2016-08-11 14:42:18 +02:00
Maciej Suminski 8227cd6d80 Do not recreate the simulator every time simulation is run 2016-08-11 14:42:17 +02:00
Maciej Suminski eeeb3e0a9a Simulator code formatting and clean up 2016-08-11 14:42:17 +02:00
Maciej Suminski 2c576afdf3 Fixed menu entries 2016-08-11 14:42:13 +02:00
Maciej Suminski ca13dc93b1 Support for simulation workbooks 2016-08-11 14:42:12 +02:00
Maciej Suminski 7b81516b61 Fixed SIM_PLOT_FRAME::CurrentPlot() 2016-08-11 14:42:12 +02:00
Maciej Suminski 01d18bad97 Save simulation command directive for every plot 2016-08-11 14:42:10 +02:00
Maciej Suminski fb56420654 Do not store Spice vector names, but regenerate them 2016-08-11 14:42:10 +02:00
Maciej Suminski ed8f555331 Remove plots that are invalid after component removal 2016-08-11 14:42:09 +02:00
Maciej Suminski 672fd76995 Remove tuners for components that were removed 2016-08-11 14:42:09 +02:00
Maciej Suminski 06287e4986 Display an error message for unannotated schematics 2016-08-11 14:42:09 +02:00
Maciej Suminski bf758dce3e Tuners are common for all plots 2016-08-11 14:42:07 +02:00
Maciej Suminski 2f8f92cf0a Closing tabs with middle button click I could not find a way to make tab close button work in wxWidgets.. 2016-08-11 14:42:07 +02:00
Maciej Suminski fccf71aadd Change 'Run Simulation' button icon when simulation is running 2016-08-11 14:42:06 +02:00
Maciej Suminski 8306cd3b9b Fixed tuners layout after a tuner is removed 2016-08-11 14:42:06 +02:00
Maciej Suminski 7d268d2608 Reset scales upon simulation relaunch 2016-08-11 14:42:04 +02:00
Maciej Suminski ba3ce9b566 Fixed tuner autoplacement 2016-08-11 14:42:03 +02:00
Tomasz Wlostowski 36297f84c3 sim: further locale hacks, fixed plot/welcome message sizing 2016-08-11 14:42:02 +02:00
Tomasz Wlostowski 8e4ae1968f sim: working on improved UX [wip] 2016-08-11 14:42:01 +02:00
Tomasz Wlostowski 8c14f2f6b1 sim: working on UX 2016-08-11 14:42:00 +02:00
Maciej Suminski ce59b282d3 Display both axis names in the cursor list 2016-08-11 14:41:56 +02:00
Maciej Suminski 973a3d7bcb Fixed a crash when a signal was removed 2016-08-11 14:41:56 +02:00
Maciej Suminski b25781814d Fixed cursors 2016-08-11 14:41:55 +02:00
Maciej Suminski 5fdc32b79a AC analysis plots using linear frequency scale 2016-08-11 14:41:52 +02:00
Maciej Suminski 0f993ba98c Current probing 2016-08-11 14:41:52 +02:00
Maciej Suminski 27a7a9b1a5 Spice fields enum values renamed from SPICE_* to SF_* 2016-08-11 14:41:51 +02:00
Maciej Suminski cf28e843ba Fix for crash when AC simulation is relaunched 2016-08-11 14:41:50 +02:00
Maciej Suminski ef45cd696d Refresh plots after simulation is relaunched 2016-08-11 14:41:50 +02:00
Tomasz Wlostowski e8d6a42e1a simulator: working on magnitude/phase plots 2016-08-11 14:41:49 +02:00
Maciej Suminski d869771f04 Display an error message if ngspice DLL is missing 2016-08-11 14:41:48 +02:00
Maciej Suminski a717194b1e Enable tuner for RLC components only 2016-08-11 14:41:45 +02:00
Maciej Suminski 92a3e405c2 Tuner tool. 2016-08-11 14:41:45 +02:00
Maciej Suminski f62a6425a3 Changed the simulator code license to GPLv3+ 2016-08-11 14:41:43 +02:00
Maciej Suminski 51f0564119 Signals are added using a separate dialog 2016-08-11 14:41:42 +02:00
Maciej Suminski b897af7eb9 Added a few checks for SIM_PLOT_FRAME to improve robustness 2016-08-11 14:41:41 +02:00
Maciej Suminski 6bfe6342fc Simulator fixes for Windows 2016-08-11 14:41:41 +02:00
Maciej Suminski 3e2061158e SIM_PLOT_FRAME: Do not update plots if the just run a different type of simulation 2016-08-11 14:41:39 +02:00
Maciej Suminski 78526ee913 Additional options for netlist exporter (fix passive values, library include paths) 2016-08-11 14:41:36 +02:00
Maciej Suminski 90b6112c5d Rearranged SIM_PLOT_FRAME, changed console log from wxRichTextCtrl to wxTextCtrl 2016-08-11 14:41:35 +02:00
Maciej Suminski e90fcaa6d9 New type of simulation opens a new plot 2016-08-11 14:41:35 +02:00
Maciej Suminski 2b1784cfc6 Simulation settings combo boxes are filled with net/power source choices 2016-08-11 14:41:30 +02:00
Maciej Suminski a2b16ae640 Initial 'Simulation settings' dialog 2016-08-11 14:41:29 +02:00
Maciej Suminski 17294aaf6a Simulation plot CSV & PNG export 2016-08-11 14:41:28 +02:00
Maciej Suminski 1d4fe279db Menu entries to toggle legend & coordinates 2016-08-11 14:41:27 +02:00
Maciej Suminski 8c138312fb Cursors are updated on request instead of using update UI events Previously CPU was busy updating the list of cursors even though nothing was changing. 2016-08-11 14:41:27 +02:00
Maciej Suminski e364cfdbac Renamed wxEVT_SIM* events to EVT_SIM* 2016-08-11 14:41:27 +02:00
Maciej Suminski fa4ba69661 Simplified SIM_PLOT_FRAME layout Removed unnecessary panels & sizers, changed wxAuiNotebook to wxNotebook 2016-08-11 14:41:26 +02:00
Maciej Suminski 433f934dc1 Simulation frame displays a list of cursors and their values 2016-08-11 14:41:26 +02:00
Maciej Suminski f3fabeb9fb Right click context menu for signals (including adding cursors) 2016-08-11 14:41:25 +02:00
Maciej Suminski 88adcc894a SIM_PLOT_FRAME::CurrentPlot() made public 2016-08-11 14:41:25 +02:00
Maciej Suminski 8b61bb4acc Signals toggling in SIM_PLOT_PANEL 2016-08-11 14:41:24 +02:00
Maciej Suminski 24bccb00d6 Menu event handlers for simulation plot frame 2016-08-11 14:41:22 +02:00
Maciej Suminski 51906625ee Replaced sim plotting widget with wxMathPlot 2016-08-11 14:41:21 +02:00
Maciej Suminski 951d16c655 Fixed Spice netlist export options and added a few new flags 2016-08-11 14:41:20 +02:00
Maciej Suminski 9f3324bac7 Changed the way ngspice is executed Previously it was run in a wxThread, but it did not allow to issue commands while the simulation is running. If you check ngspice shared library source code, then you will discover "bg_*" commands that executes commands in background, so the simulator still can be controlled. 2016-08-11 14:41:19 +02:00
Maciej Suminski 544da3feda Handle 'Simulate' button label in idle event handler 2016-08-11 14:41:19 +02:00
Maciej Suminski aea29fc730 Update already plotted signals upon simulation run 2016-08-11 14:41:18 +02:00
Maciej Suminski 8fdb9e8307 SIM_PLOT_FRAME::NewPlot() -> SIM_PLOT_FRAME::NewPlotPanel() 2016-08-11 14:41:17 +02:00
Maciej Suminski cb463f48b1 Add a signal on double click 2016-08-11 14:41:16 +02:00
Maciej Suminski 0d764741f9 Simulation commands moved from eeschema menu to SIM_PLOT_FRAME buttons 2016-08-11 14:41:16 +02:00
Maciej Suminski 2b1d2d7bd1 Fixed Kiway problems in SIM_PLOT_FRAME 2016-08-11 14:41:15 +02:00
Maciej Suminski ac17165947 Initial version of simulator probe tool 2016-08-11 14:41:11 +02:00
Maciej Suminski aa3e251cdd Sim plots get consecutive numbers 2016-08-11 14:41:11 +02:00
Maciej Suminski 0d8c095215 Fill the signal list box when a simulation is finished 2016-08-11 14:41:10 +02:00
Maciej Suminski 402a438339 NETLIST_EXPORTER_PSPICE adjusts paths for .include directives 2016-08-11 14:41:09 +02:00
Maciej Suminski 9ef2cb94bf Simulation executes in a separate thread 2016-08-11 14:41:07 +02:00
Maciej Suminski e72b54a6e0 Code cleanup 2016-08-11 14:41:07 +02:00
Maciej Suminski 9e2485ea97 SPICE_SIMULATOR: Code formatting & clean up 2016-08-11 14:41:07 +02:00
Tomasz Wlostowski 095af6e77a wip 2016-08-11 14:41:01 +02:00
Tomasz Wlostowski f1f69979e6 ngspice: something starts to work 2016-08-11 14:41:01 +02:00